code: def _patch_distribution_metadata():
      
      for attr in ('write_pkg_file', 'read_pkg_file', 'get_metadata_version'):
          new_val = getattr(setuptools.dist, attr)
          setattr(distutils.dist.DistributionMetadata, attr, new_val)
docs: Patch write_pkg_file and read_pkg_file for higher metadata standards