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: Returns resource for specified type and params
  
  Function serches for resource in cache, when not present creates
  requested resource and put it to cache.
  
  Parameters
  -----------
  resource_type : str
      Type of resource to be generated
  params_values : dict
      Dict for param types as keys and Param objects as values
  cache : bool
      If search for resource in cache and put calculated resource into cache.
  
  Returns
  --------
  PlotContainer
docstr_tok: ["Returns","resource","for","specified","type","and","params","Function","serches","for","resource","in","cache",",","when","not","present","creates","requested","resource","and","put","it","to","cache",".","Parameters","--","--","--","--","--","-","resource_type",":","str","Type","of","resource","to","be","generated","params_values",":","dict","Dict","for","param","types","as","keys","and","Param","objects","as","values","cache",":","bool","If","search","for","resource","in","cache","and","put","calculated","resource","into","cache",".","Returns","--","--","--","--","PlotContainer"]
code: def get_resource(self, resource_type, params_values, cache=True):
      """Returns resource for specified type and params
  
      Function serches for resource in cache, when not present creates
      requested resource and put it to cache.
  
      Parameters
      -----------
      resource_type : str
          Type of resource to be generated
      params_values : dict
          Dict for param types as keys and Param objects as values
      cache : bool
          If search for resource in cache and put calculated resource into cache.
  
      Returns
      --------
      PlotContainer
      """
      resource_class = next(
          (
              c
              for c in self.resources
              if c.resource_type == resource_type
          ),
          None,
      )
      if resource_class is None:
          raise Exception("Not supported resource type")
      required_params_values = {}
      required_params_labels = {}
      for p in resource_class.required_params:
          if params_values.get(p) is None:
              raise Exception("Required param is missing")
          required_params_values[p] = params_values.get(p)
          required_params_labels[p] = params_values.get(p).get_label()
      result = (
          self.find_in_cache(resource_type, required_params_labels)
          if cache
          else None
      )
      if result is None:
          result = resource_class(self.arena).fit(
              required_params_values
          )
          if cache:
              self.put_to_cache(result)
          else:
              # while is_done is False
              while not result.get_result()[2]:
                  result.wait_for_update()
      return result
  
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 5 for calling the ResourceManager obj's underlying member method code with example usage: obj.get_resource(resource_type, params_values, cache) and returns: result