code: def validate(defaults, metadata, config):
      
      for path, _, default, parent, value in zip_dicts(defaults, config):
          if isinstance(default, Requirement):
              # validate the current value and assign the output
              parent[path[-1]] = default.validate(metadata, path, value)
docs: Validate configuration.