find a component from the Ariane server cache depending on its id
        :param co_id: the component id to find
        :return: the component if found and None if not
9537
def find_component(co_id):
        
        LOGGER.debug("InjectorCachedComponentService.find_component")
        ret = None
        if co_id is not None:
            args = {'properties': {'OPERATION': 'PULL_COMPONENT_FROM_CACHE',
                                   'REMOTE_COMPONENT': str({'componentId': co_id}).replace("'", '"'),
                                   'CACHE_ID': InjectorCachedComponentService.cache_id}}

            result = InjectorCachedComponentService.requester.call(args).get()
            if result.rc == 0:
                ret = InjectorCachedComponent.json_2_injector_component(result.response_properties)
                ret.blob = result.response_content
            elif result.rc != 404:
                err_msg = 'InjectorCachedComponentService.find_component - Problem while finding component ( id : ' + \
                          co_id + \
                          'Reason: ' + str(result.response_content) + '-' + str(result.error_message) + \
                          " (" + str(result.rc) + ")"
                LOGGER.warning(err_msg)
        return ret
439946
public static String getComponentClientId(final String componentId) {
		FacesContext context = FacesContext.getCurrentInstance();
		UIViewRoot root = context.getViewRoot();

		UIComponent c = findComponent(root, componentId);
		if (c==null) {
			return null;
		}
		return c.getClientId(context);
	}
52619
def show(cls, app_id):
        
        conn = Qubole.agent()
        return conn.get(cls.element_path(app_id))
465970
def get_configuration_set_by_id(self, id):
        '''

        '''
        for cs in self.configuration_sets:
            if cs.id == id:
                return cs
        return None
1001156
def get_parent_component(self, fc):
        
        if self.debug: print("Looking for parent of %s (%s)"%(fc.id, fc.parent_id)) 
        parent_comp = None
        for comp in self.components.values():
            if self.debug: print(" - Checking "+comp.id) 
            for child in comp.children:
                if parent_comp == None:
                    if child.id == fc.id and comp.id == fc.parent_id:
                        if self.debug: print("1) It is "+comp.id) 
                        parent_comp = comp
                    else:
                        for child2 in child.children:
                            if self.debug: print("    - Checking child: %s, %s"%(child.id,child2.id)) 
                            if parent_comp == None and child2.id == fc.id and child.id == fc.parent_id:
                                if self.debug: print("2) It is "+child.id) 
                                parent_comp = child
                                break
                            else:
                                if self.debug: print("No..."   )
        return parent_comp
1147820
def get_mark(self, mark_id):
        
        if mark_id in self.idx:
            return Cmarkable(self.idx[mark_id], self.type)
        else:
            return None
612036
def fetch_identifier_component(self, endpoint_name, identifier_data, query_params=None):
        """"""

        if query_params is None:
            query_params = {}

        identifier_input = self.get_identifier_input(identifier_data)

        return self._api_client.fetch(endpoint_name, identifier_input, query_params)
893295
def _find_by_id(self, resource, _id, parent=None):
        
        def is_found(hit):
            if 'exists' in hit:
                hit['found'] = hit['exists']
            return hit.get('found', False)

        args = self._es_args(resource)
        try:
            # set the parent if available
            if parent:
                args['parent'] = parent

            hit = self.elastic(resource).get(id=_id, **args)

            if not is_found(hit):
                return

            docs = self._parse_hits({'hits': {'hits': [hit]}}, resource)
            return docs.first()

        except elasticsearch.NotFoundError:
            return
        except elasticsearch.TransportError as tex:
            if tex.error == 'routing_missing_exception' or 'RoutingMissingException' in tex.error:
                # search for the item
                args = self._es_args(resource)
                query = {'query': {'bool': {'must': [{'term': {'_id': _id}}]}}}
                try:
                    args['size'] = 1
                    hits = self.elastic(resource).search(body=query, **args)
                    docs = self._parse_hits(hits, resource)
                    return docs.first()
                except elasticsearch.NotFoundError:
                    return
872542
def load(self, id): #pylint:disable=redefined-builtin
        
        l.debug("LOAD: %s", id)
        try:
            l.debug("... trying cached")
            return self._object_cache[id]
        except KeyError:
            l.debug("... cached failed")
            with self._read_context(id) as u:
                return VaultUnpickler(self, u).load()
956762
def find_by_ids(ids, connection=None, page_size=100, page_number=0,
        sort_by=DEFAULT_SORT_BY, sort_order=DEFAULT_SORT_ORDER):
        
        ids = ','.join([str(i) for i in ids])
        return pybrightcove.connection.ItemResultSet('find_playlists_by_ids',
            Playlist, connection, page_size, page_number, sort_by, sort_order,
            playlist_ids=ids)
61806
def get(self, comp_name):
	
		
		
		try:
			return self.__cache[comp_name]
		except KeyError:
			comp_stub = ComponentStub(self, comp_name, self.__prof)
			self.__cache[comp_name] = comp_stub
			return comp_stub
704371
def find(self, item_id, basic=False, **kwargs):
        
        if basic:
            return self.transport.GET(url='/item/%d/basic' % item_id)
        return self.transport.GET(kwargs, url='/item/%d' % item_id)
227883
def getComponent(self, innerFlag=False):
        
        if self._currentIdx is None:
            raise error.PyAsn1Error('Component not chosen')
        else:
            c = self._componentValues[self._currentIdx]
            if innerFlag and isinstance(c, Choice):
                return c.getComponent(innerFlag)
            else:
                return c
1013234
def get_module_by_id(module_id: str) -> Union[EFBChannel, EFBMiddleware]:
    
    try:
        if master.channel_id == module_id:
            return master
    except NameError:
        pass
    if module_id in slaves:
        return slaves[module_id]
    for i in middlewares:
        if i.middleware_id == module_id:
            return i
    raise NameError("Module ID {} is not found".format(module_id))
14693
def find_task_by_id(self, id, session=None):
        
        with self._session(session) as session:
            return session.query(TaskRecord).get(id)
728026
def component(self, extra_params=None):
        
        if self.get('component_id', None):
            components = self.space.components(id=self['component_id'], extra_params=extra_params)
            if components:
                return components[0]
976635
def get(cls, id):
        

        # cached?
        if CACHE:
            if id in _cache['Prefix']:
                log.debug('cache hit for prefix %d' % id)
                return _cache['Prefix'][id]
            log.debug('cache miss for prefix %d' % id)

        try:
            prefix = Prefix.list({'id': id})[0]
        except IndexError:
            raise NipapNonExistentError('no prefix with ID ' + str(id) + ' found')

        _cache['Prefix'][id] = prefix
        return prefix