'Add/set the given dict of attrs on the asset at the given location. Value can be any type which pymongo accepts.
Arguments:
asset_key (AssetKey): asset identifier
attr_dict (dict): attribute: value pairs to set
Raises:
ItemNotFoundError if no such item exists
AttributeError is attr is one of the build in attrs.'

@contract(asset_key='AssetKey', attr_dict=dict, user_id='int|long')
def set_asset_metadata_attrs(self, asset_key, attr_dict, user_id):

    (course_assets, asset_idx) = self._find_course_asset(asset_key)
    if (asset_idx is None):
        raise ItemNotFoundError(asset_key)
    all_assets = course_assets[asset_key.asset_type]
    md = AssetMetadata(asset_key, asset_key.path)
    md.from_storable(all_assets[asset_idx])
    md.update(attr_dict)
    all_assets[asset_idx] = md.to_storable()
    self.asset_collection.update({'_id': course_assets.doc_id}, {'$set': {self._make_mongo_asset_key(asset_key.asset_type): all_assets}})
