NYC finalizes rules for letter-grade inspections