code: def _create_infile(self, data=None):
      infile = os_helper.TESTFN
      with open(infile, "w", encoding="utf-8") as fp:
          self.addCleanup(os.remove, infile)
          fp.write(data or self.data)
      return infile
  
imports: import errno
  import os
  import sys
  import textwrap
  import unittest
  import subprocess
  from test import support
  from test.support import os_helper
  from test.support.script_helper import assert_python_ok
label_desc: Use image node_id 2 for calling the TestTool obj's underlying member method code with example usage: obj._create_infile(data) and returns: infile