def get_custom_fields(data):
 data_copy = deepcopy(data)
 field_names = {}
 for (key, value) in data.iteritems():
  if (key in DEFAULT_FIELD_NAMES):
   field_names[key] = data_copy.pop(key)
 return (field_names, data_copy)

def get_custom_fields ( data ) : data_copy = deepcopy ( data ) field_names = { } for ( key , value ) in data . iteritems ( ) : if ( key in DEFAULT_FIELD_NAMES ) : field_names [ key ] = data_copy . pop ( key ) return ( field_names , data_copy )
return two dicts .