class_docstr: Validate a metadata field.
  
  All _process_*() methods correspond to a core metadata field. The method is
  called with the field's raw value. If the raw value is valid it is returned
  in its "enriched" form (e.g. ``version.Version`` for the ``Version`` field).
  If the raw value is invalid, :exc:`InvalidMetadata` is raised (with a cause
  as appropriate).
code: def _invalid_metadata(
      self, msg: str, cause: Optional[Exception] = None
  ) -> InvalidMetadata:
      exc = InvalidMetadata(
          self.raw_name, msg.format_map({"field": repr(self.raw_name)})
      )
      exc.__cause__ = cause
      return exc
  
imports: import email.feedparser
  import email.header
  import email.message
  import email.parser
  import email.policy
  import sys
  import typing
  from typing import Any, Callable, Dict, Generic, List, Optional, Tuple, Type, Union, cast
  from .None import requirements, specifiers, utils, version
label_desc: Use image node_id 4 for calling the _Validator obj's underlying member method code with example usage: obj._invalid_metadata(msg, cause) and returns: exc