docstr: Same prefix/suffix as mkstemp uses
  :param prefix: Same prefix/suffix as mkstemp uses
  :param suffix: Same prefix/suffix as mkstemp uses
  :return: consistent temp file inside a single folder that later we rename to a temp file
docstr_tok: ["Same","prefix\/suffix","as","mkstemp","uses",":","param","prefix",":","Same","prefix\/suffix","as","mkstemp","uses",":","param","suffix",":","Same","prefix\/suffix","as","mkstemp","uses",":","return",":","consistent","temp","file","inside","a","single","folder","that","later","we","rename","to","a","temp","file"]
code: def _push_temp_file(self, prefix=None, suffix=None):
      """
      Same prefix/suffix as mkstemp uses
      :param prefix: Same prefix/suffix as mkstemp uses
      :param suffix: Same prefix/suffix as mkstemp uses
      :return: consistent temp file inside a single folder that later we rename to a temp file
      """
      # we want to make sure our temp naming convention is consistent
      # this is important for hashing zip files and gz files, because the name of the internal
      # file becomes part of the content and then hash changes
  
      # temp filename is based on the assumption
  
      # put a consistent the file into a temp folder because the filename is part of
      # the compressed artifact and we want consistency. After that we rename compressed file to temp file and
      # delete temp folder
      temp_folder = mkdtemp(prefix="artifacts_")
      local_filename = Path(temp_folder) / (
          str(prefix).rstrip(".") + "." + str(suffix).lstrip(".")
      )
      local_filename = local_filename.as_posix()
      self._temp_files_lookup[local_filename] = (
          temp_folder,
          deepcopy(prefix),
          deepcopy(suffix),
      )
      return local_filename
  
imports: import gzip
  import io
  import json
  import yaml
  import mimetypes
  import os
  import pickle
  from six.moves.urllib.parse import quote
  from copy import deepcopy
  from datetime import datetime
  from multiprocessing.pool import ThreadPool
  from tempfile import mkdtemp, mkstemp
  from threading import Thread
  from time import time
  from zipfile import ZipFile, ZIP_DEFLATED
  import six
  from PIL import Image
  from pathlib2 import Path
  from six.moves.urllib.parse import urlparse
  from typing import Dict, Union, Optional, Any, Sequence, Callable
  from ..backend_api import Session
  from ..backend_api.services import tasks
  from ..backend_interface.metrics.events import UploadEvent
  from ..debugging.log import LoggerRoot
  from ..storage.helper import remote_driver_schemes
  from ..storage.util import sha256sum, format_size, get_common_path
  from ..utilities.process.mp import SafeEvent, ForkSafeRLock
  from ..utilities.proxy_object import LazyEvalWrapper
label_desc: Use image node_id 18 for calling the Artifacts obj's underlying member method code with example usage: obj._push_temp_file(prefix, suffix) and returns: local_filename