code: def gen_tmp_file(i):
      
  
      xs=i.get('suffix','')
      xp=i.get('prefix','')
      s=i.get('string','')
  
      import tempfile
      fd, fn=tempfile.mkstemp(suffix=xs, prefix=xp)
      os.close(fd)
      os.remove(fn)
  
      if i.get('remove_dir','')=='yes':
         fn=os.path.basename(fn)
  
      return {'return':0, 'file_name':fn}
docs: Input:  {
                (suffix)     - temp file suffix
                (prefix)     - temp file prefix
                (remove_dir) - if 'yes', remove dir
              }
  
      Output: {
                return       - return code =  0, if successful
                                           >  0, if error
                (error)      - error text if return > 0
  
                file_name    - temp file name 
              }