'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)
def set_asset_metadata_attrs(self, asset_key, attr_dict, user_id):

    def _internal_method(all_assets, asset_idx):
        '\n                                                Update    the    found    item\n                                                '
        if (asset_idx is None):
            raise ItemNotFoundError(asset_key)
        mdata = AssetMetadata(asset_key, asset_key.path)
        mdata.from_storable(all_assets[asset_idx])
        mdata.update(attr_dict)
        all_assets[asset_idx] = mdata.to_storable()
        return all_assets
    self._update_course_assets(user_id, asset_key, _internal_method)
