code: def write_setup(self, text, path=test.test_support.TESTFN):
      f = open(path, "w")
      try:
          f.write(text)
      finally:
          f.close()
      return path
  
imports: import StringIO
  import distutils.core
  import os
  import shutil
  import sys
  import test.test_support
  from test.test_support import captured_stdout, run_unittest
  import unittest
  from distutils.tests import support
  from distutils import log
label_desc: Use image node_id 4 for calling the CoreTestCase obj's underlying member method code with example usage: obj.write_setup(text, path) and returns: path