code: def test_custom_pydistutils(self):
      # fixes #2166
      # make sure pydistutils.cfg is found
      if os.name == "posix":
          user_filename = ".pydistutils.cfg"
      else:
          user_filename = "pydistutils.cfg"
  
      temp_dir = self.mkdtemp()
      user_filename = os.path.join(temp_dir, user_filename)
      f = open(user_filename, "w")
      try:
          f.write(".")
      finally:
          f.close()
  
      try:
          dist = Distribution()
  
          # linux-style
          if sys.platform in ("linux", "darwin"):
              os.environ["HOME"] = temp_dir
              files = dist.find_config_files()
              self.assertIn(user_filename, files)
  
          # win32-style
          if sys.platform == "win32":
              # home drive should be found
              os.environ["HOME"] = temp_dir
              files = dist.find_config_files()
              self.assertIn(
                  user_filename,
                  files,
                  "%r not found in %r" % (user_filename, files),
              )
      finally:
          os.remove(user_filename)
  
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 14 for calling the MetadataTestCase obj's underlying member method code with example usage: obj.test_custom_pydistutils() without return types