class_docstr: Creates ResourceManager object
  
  This class should be only created by arena instance to manage its resources.
  
  Parameters
  ----------
  arena : dalex.Arena
      Instance of Arena.
  
  Attributes
  --------
  arena : Arena
      Instance of dalex.Arena
  cache : list of Resource objects
      List of already requested resources (both calculated and in progress)
  mutex : _thread.lock
      Mutex for params, plots and resources cache. Should be common with mutex from Arena instance.
  resources : list of classes extending PlotContainer
      List of available resource classes
docstr: Function searches for cached resource
  
  Parameters
  -----------
  resource_type : str
      Value of resource_type field, that requested resource must have
  params : dict
      Keys of this dict are params types (model, observation, variable, dataset)
      and values are corresponding params labels. Requested resource must have equal
      params field.
  
  Returns
  --------
  Resource or None
docstr_tok: ["Function","searches","for","cached","resource","Parameters","--","--","--","--","--","-","resource_type",":","str","Value","of","resource_type","field",",","that","requested","resource","must","have","params",":","dict","Keys","of","this","dict","are","params","types","(","model",",","observation",",","variable",",","dataset",")","and","values","are","corresponding","params","labels",".","Requested","resource","must","have","equal","params","field",".","Returns","--","--","--","--","Resource","or","None"]
code: def find_in_cache(self, resource_type, params):
      """Function searches for cached resource
  
      Parameters
      -----------
      resource_type : str
          Value of resource_type field, that requested resource must have
      params : dict
          Keys of this dict are params types (model, observation, variable, dataset)
          and values are corresponding params labels. Requested resource must have equal
          params field.
  
      Returns
      --------
      Resource or None
      """
  
      def _filter(p):
          return p.resource_type == resource_type and params == p.params
  
      with self.mutex:
          return next(filter(_filter, self.cache), None)
  
file_path: DALEX/python/dalex/dalex/arena/_resource_manager.py
imports: from ._resource import Resource
  from .None import resources
label_desc: Use image node_id 2 for calling the ResourceManager obj's underlying member method code with example usage: obj.find_in_cache(resource_type, params) and returns: unknown, next