code: def mode_new_collection():
      
  
      print globals()['mode_new_collection'].__doc__
      collection_name = raw_input("Collection name: ")
      item_attr_list = []
      collection_node_id = None
      if collection_name:
          collection_node_id = insert_node(name=collection_name, value=None)
          insert_query(name='select_link_node_from_node.sql', node_id=collection_node_id)
          item_attr = True
          while item_attr:
              item_attr = raw_input("Add a collection item attribute name: ")
              if item_attr:
                  item_attr_list.append(item_attr)
  
      # if no collection name then exit
      selection = collection_name
  
      while selection:
          selection = select([
              'Add item',
              ])
          if selection == 'Add item':
              # create item
              add_item_with_attributes_to_collection(
                      collection_name=collection_name,
                      collection_node_id=collection_node_id,
                      item_attr_list=item_attr_list)
  
      if collection_node_id:
          print "Added collection name '{0}' with node id: {1}".format(collection_name, collection_node_id)
docs: Create a new collection of items with common attributes.