code: def getLocalTempFile(self):
          
          handle, tmpFile = tempfile.mkstemp(prefix="tmp", suffix=".tmp", dir=self.localTempDir)
          os.close(handle)
          return os.path.abspath(tmpFile)
docs: Get a new local temporary file that will persist for the duration of the job.
  
          :return: The absolute path to a local temporary file. This file will exist for the
                   duration of the job only, and is guaranteed to be deleted once the job terminates.
          :rtype: str