def deserialize(collection, topological=True):
 datastruct = deserialize_raw(collection.collection_type())
 if (topological and (type(datastruct) == list)):
  datastruct.sort(__depth_cmp)
 if (type(datastruct) == dict):
  collection.from_dict(datastruct)
 elif (type(datastruct) == list):
  collection.from_list(datastruct)

def deserialize ( collection , topological = True ) : datastruct = deserialize_raw ( collection . collection_type ( ) ) if ( topological and ( type ( datastruct ) == list ) ) : datastruct . sort ( __depth_cmp ) if ( type ( datastruct ) == dict ) : collection . from_dict ( datastruct ) elif ( type ( datastruct ) == list ) : collection . from_list ( datastruct )
deserialize any string or stream like object into a python data structure .