Every person, corporation, or body that shall violate or not conform to any provisions of the health code of the city of New York, or any rule or sanitary regulation duly made, shall be liable to pay a penalty not exceeding the maximum amount allowed by the health code of the city of New York, or any other applicable law, rule or regulation. The judge, justice, administrative law judge or hearing examiner who presided at a trial or hearing where such penalty is determined and assessed shall fix, in writing, the amount of the penalty to be recovered, and shall direct that such amount be included in the judgment or decision.