def _split_vars_files(data):
 v_vars = []
 v_files = []
 for token in data.iter_tokens():
  pname = token.get_name()
  value = token.get_value()
  enc_pname = smart_str(pname, encoding=DEFAULT_ENCODING)
  if is_file_like(value):
   if (not value.closed):
    v_files.append((enc_pname, value))
   else:
    v_vars.append((enc_pname, ''))
  elif hasattr(value, 'isFile'):
   v_files.append((enc_pname, value))
  else:
   value = smart_str(value, encoding=DEFAULT_ENCODING)
   v_vars.append((enc_pname, value))
 return (v_vars, v_files)

def _split_vars_files ( data ) : v_vars = [ ] v_files = [ ] for token in data . iter_tokens ( ) : pname = token . get_name ( ) value = token . get_value ( ) enc_pname = smart_str ( pname , encoding = DEFAULT_ENCODING ) if is_file_like ( value ) : if ( not value . closed ) : v_files . append ( ( enc_pname , value ) ) else : v_vars . append ( ( enc_pname , '' ) ) elif hasattr ( value , 'isFile' ) : v_files . append ( ( enc_pname , value ) ) else : value = smart_str ( value , encoding = DEFAULT_ENCODING ) v_vars . append ( ( enc_pname , value ) ) return ( v_vars , v_files )
based on the request it decides if we should send the request as multipart or not .