code: def test_read_metadata(self):
      attrs = {
          "name": "package",
          "version": "1.0",
          "long_description": "desc",
          "description": "xxx",
          "download_url": "http://example.com",
          "keywords": ["one", "two"],
          "requires": ["foo"],
      }
  
      dist = Distribution(attrs)
      metadata = dist.metadata
  
      # write it then reloads it
      PKG_INFO = StringIO.StringIO()
      metadata.write_pkg_file(PKG_INFO)
      PKG_INFO.seek(0)
      metadata.read_pkg_file(PKG_INFO)
  
      self.assertEqual(metadata.name, "package")
      self.assertEqual(metadata.version, "1.0")
      self.assertEqual(metadata.description, "xxx")
      self.assertEqual(metadata.download_url, "http://example.com")
      self.assertEqual(metadata.keywords, ["one", "two"])
      self.assertEqual(metadata.platforms, ["UNKNOWN"])
      self.assertEqual(metadata.obsoletes, None)
      self.assertEqual(metadata.requires, ["foo"])
  
imports: import os
  import StringIO
  import sys
  import unittest
  import warnings
  import textwrap
  from distutils.dist import Distribution, fix_help_options
  from distutils.cmd import Command
  import distutils.dist
  from test.test_support import TESTFN, captured_stdout, run_unittest, unlink
  from distutils.tests import support
  from distutils import log
label_desc: Use image node_id 17 for calling the MetadataTestCase obj's underlying member method code with example usage: obj.test_read_metadata() without return types