code: def _validate_metadata(metadata_props):
      '''
      Validate metadata properties and possibly show warnings or throw exceptions.
  
      :param metadata_props: A dictionary of metadata properties, with property names and values (see :func:`~onnxmltools.utils.metadata_props.add_metadata_props` for examples)
      '''
      if len(CaseInsensitiveDict(metadata_props)) != len(metadata_props):
          raise RuntimeError('Duplicate metadata props found')
  
      for key, value in metadata_props.items():
          valid_values = KNOWN_METADATA_PROPS.get(key)
          if valid_values and value.lower() not in valid_values:
              warnings.warn('Key {} has invalid value {}. Valid values are {}'.format(key, value, valid_values)f _validate_metadata(metadata_props):
      '''
      Validate metadata properties and possibly show warnings or throw exceptions.
  
      :param metadata_props: A dictionary of metadata properties, with property names and values (see :func:`~onnxmltools.utils.metadata_props.add_metadata_props` for examples)
      '''
      if len(CaseInsensitiveDict(metadata_props)) != len(metadata_props):
          raise RuntimeError('Duplicate metadata props found')
  
      for key, value in metadata_props.items():
          valid_values = KNOWN_METADATA_PROPS.get(key)
          if valid_values and value.lower() not in valid_values:
              warnings.warn('Key {} has invalid value {}. Valid values are {}'.format(key, value, valid_values))
docs: Validate metadata properties and possibly show warnings or throw exceptions.
  
      :param metadata_props: A dictionary of metadata properties, with property names and values (see :func:`~onnxmltools.utils.metadata_props.add_metadata_props` for examples)