parameters: (val, collections, default_collections)
docstring: Adds keys to a collection.
  
    Args:
      val: The value to add per each key.
      collections: A collection of keys to add.
      default_collections: Used if collections is None.
docstring_summary: Adds keys to a collection.
docstring_tokens: Adds keys to a collection .
function: def collect(val, collections, default_collections):
    """Adds keys to a collection.
  
    Args:
      val: The value to add per each key.
      collections: A collection of keys to add.
      default_collections: Used if collections is None.
    """
    if collections is None:
      collections = default_collections
    for key in collections:
      ops.add_to_collection(key, val)
function_tokens: def collect ( val , collections , default_collections ) : if collections is None : collections = default_collections for key in collections : ops . add_to_collection ( key , val )