#NEWLINE# def create_new_collection( cid , title , aliases , ip_address , refset_metadata , myredis , mydao ) : #NEWLINE# #INDENT# analytics_credentials = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# tiids_aliases_map = item_module . create_tiids_from_aliases ( aliases , analytics_credentials , myredis ) #NEWLINE# tiids = tiids_aliases_map . keys ( ) #NEWLINE# aliases = tiids_aliases_map . values ( ) #NEWLINE# ( coll_doc , key ) = make ( cid ) #NEWLINE# if refset_metadata : #NEWLINE# #INDENT# coll_doc [ 'refset_metadata' ] = refset_metadata #NEWLINE# #UNINDENT# coll_doc [ 'ip_address' ] = ip_address #NEWLINE# coll_doc [ 'title' ] = title #NEWLINE# alias_strings = get_alias_strings ( key ) #NEWLINE# coll_doc [ 'alias_tiids' ] = dict ( zip ( alias_strings , tiids ) ) #NEWLINE# collection_obj = create_objects_from_collection_doc ( coll_doc ) #NEWLINE# return ( coll_doc , collection_obj )