code: def generate_header_validator(headers, context, **kwargs):
      
      validators = ValidationDict()
      for header_definition in headers:
          header_processor = generate_value_processor(
              context=context,
              **header_definition
          )
          header_validator = generate_object_validator(
              field_validators=construct_header_validators(header_definition, context=context),
          )
          validators.add_property_validator(
              header_definition['name'],
              chain_reduce_partial(
                  header_processor,
                  header_validator,
              ),
          )
      return generate_object_validator(field_validators=validators)
docs: Generates a validation function that will validate a dictionary of headers.