parameters: (cls, newline=None, suffix="", directory=None)
return_statement: return temp_file.name
docstring: Create a temporary file, and optional directory, and returns the file name.
docstring_summary: Create a temporary file, and optional directory, and returns the file name.
docstring_tokens: Create a temporary file and optional directory and returns the file name .
function: def create(cls, newline=None, suffix="", directory=None):
          """Create a temporary file, and optional directory, and returns the file name."""
          if directory and not os.path.isdir(directory):
              LOGGER.debug("Creating temporary directory %s", directory)
              os.makedirs(directory)
              cls._DIR_LIST.append(directory)
          temp_file = tempfile.NamedTemporaryFile(mode="w+", newline=newline, suffix=suffix,
                                                  dir=directory, delete=False)
          cls._FILE_MAP[temp_file.name] = temp_file
          return temp_file.name
function_tokens: def create ( cls , newline = None , suffix = "" , directory = None ) : if directory and not os . path . isdir ( directory ) : LOGGER . debug ( "Creating temporary directory %s" , directory ) os . makedirs ( directory ) cls . _DIR_LIST . append ( directory ) temp_file = tempfile . NamedTemporaryFile ( mode = "w+" , newline = newline , suffix = suffix , dir = directory , delete = False ) cls . _FILE_MAP [ temp_file . name ] = temp_file return temp_file . name