def prepare_for_serialization(objects):
 if (isinstance(objects, list) and len(objects) and isinstance(objects[0], dict) and ('id' in objects[0])):
  objects = gather_unique_dicts(objects)
 return _prepare_data(objects)

def prepare_for_serialization ( objects ) : if ( isinstance ( objects , list ) and len ( objects ) and isinstance ( objects [ 0 ] , dict ) and ( 'id' in objects [ 0 ] ) ) : objects = gather_unique_dicts ( objects ) return _prepare_data ( objects )
prepare python objects to be returned via rpc .