find Asset for id
498138
function(files, next) {
        var i = files.indexOf(id);

        if (i < 0) {
          return next({
            error: 'NOT_FOUND',
            description: 'Asset not available: ' + searchDir + id
          });
        }

        next(null, files[i]);
      }
748800
def find_by_b64id(self, _id, **kwargs):
        

        return self.find_one({"_id": ObjectId(base64.b64decode(_id))}, **kwargs)
410368
def locate_item(ident, stateless=False, cache_id=None):
        ''''''
        if stateless:
            dash_app = find_stateless_by_name(ident)
        else:
            dash_app = get_object_or_404(DashApp, slug=ident)

        app = dash_app.as_dash_instance(cache_id=cache_id)
        return dash_app, app
69768
def document_style_by_id(id)
      root_object.document_styles.each do |style|
        return style if style.style_id == id
      end
      nil
    end
66211
def get(self, id: int) -> AssetClass:
        
        self.open_session()
        item = self.session.query(AssetClass).filter(
            AssetClass.id == id).first()
        return item
568892
def _get_lecture_asset_ids(self, course_id, video_id):
        
        dom = get_page(self._session, OPENCOURSE_ONDEMAND_LECTURE_ASSETS_URL,
                       json=True, course_id=course_id, video_id=video_id)
        # Note that we extract here "id", not definition -> assetId, as it
        # be extracted later.
        return [asset['id']
                for asset in dom['linked']['openCourseAssets.v1']]
728702
def find_one_by_id(self, _id):
        
        document = (yield self.collection.find_one({"_id": ObjectId(_id)}))
        raise Return(self._obj_cursor_to_dictionary(document))
649838
def show_item(name, id_):
    '''
    
    '''
    status, result = _query(action=name, command=id_)
    return result
433813
def find(cls, key=None, **kwargs):
        
        if not key:
            return super(Asset, cls).find(**kwargs)

        params = {"asset[key]": key}
        params.update(kwargs)
        theme_id = params.get("theme_id")
        path_prefix = "%s/themes/%s" % (cls.site, theme_id) if theme_id else cls.site

        resource = cls.find_one("%s/assets.%s" % (path_prefix, cls.format.extension), **params)

        if theme_id and resource:
            resource._prefix_options["theme_id"] = theme_id
        return resource
149995
function(id) {
			var i;
			for (i = files.length - 1; i >= 0; i--) {
				if (files[i].id === id) {
					return files[i];
				}
			}
		}
1319543
def get_item_with_id(self, uid):
        
        for item in self.get_items():
            if item.id == uid:
                return item

        return None
642002
public <P extends ParaObject> P findById(String id) {
		MultivaluedMap<String, String> params = new MultivaluedHashMap<>();
		params.putSingle(Config._ID, id);
		List<P> list = getItems(find("id", params));
		return list.isEmpty() ? null : list.get(0);
	}
117204
def get_asset_ids(self):
        
        if not self.is_asset_based_activity():
            raise IllegalState()
        else:
            ids = []
            for i in self._my_map['assetIds']:
                ids.append(Id(i))
            return IdList(ids)
1161400
def find_one(self, cls, id):
        """"""
        one = self._find(cls, {"_id": id})
        if not one:
            return None
        return one[0]
796745
def find_one(self, cls, id):
        """"""
        found = self.find_by_index(cls, 'id', id)
        return found[0] if found else None
664177
function _getIndexOfId(id) {
	return _.indexOf(goblin.ambush, _.find(goblin.ambush, {id}))
}
690668
public E findById(ID id) {
        LOG.trace("Finding " + entityClass.getSimpleName() + " with ID " + id);
        return (E) getSession().get(entityClass, id);
    }