def _sanitize_params(prefix, suffix, dir):
 output_type = _infer_return_type(prefix, suffix, dir)
 if (suffix is None):
  suffix = output_type()
 if (prefix is None):
  if (output_type is str):
   prefix = template
  else:
   prefix = _os.fsencode(template)
 if (dir is None):
  if (output_type is str):
   dir = gettempdir()
  else:
   dir = gettempdirb()
 return (prefix, suffix, dir, output_type)

def _sanitize_params ( prefix , suffix , dir ) : output_type = _infer_return_type ( prefix , suffix , dir ) if ( suffix is None ) : suffix = output_type ( ) if ( prefix is None ) : if ( output_type is str ) : prefix = template else : prefix = _os . fsencode ( template ) if ( dir is None ) : if ( output_type is str ) : dir = gettempdir ( ) else : dir = gettempdirb ( ) return ( prefix , suffix , dir , output_type )
common parameter processing for most apis in this module .