code: def write_script(self, dir, name, text):
      f = open(os.path.join(dir, name), "w")
      try:
          f.write(text)
      finally:
          f.close()
  
file_path: catboost/contrib/tools/python/src/Lib/distutils/tests/test_build_scripts.py
imports: import os
  import unittest
  from distutils.command.build_scripts import build_scripts
  from distutils.core import Distribution
  import sysconfig
  from distutils.tests import support
  from test.test_support import run_unittest
label_desc: Use image node_id 5 for calling the BuildScriptsTestCase obj's underlying member method code with example usage: obj.write_script(dir, name, text) without return types