class_docstr: Creates PlotsManager object
  
  This class should be only created by arena instance to manage its plots.
  
  Parameters
  ----------
  arena : dalex.Arena
      Instance of Arena.
  
  Attributes
  --------
  arena : Arena
      Instance of dalex.Arena
  cache : list of PlotContainer objects
      List of already calculated plots
  mutex : _thread.lock
      Mutex for params, plots and resources cache. Should be common with mutex from Arena instance.
  plots : list of classes extending PlotContainer
      List of available plot classes
docstr: Returns plot for specified type and params
  
  Function serches for plot in cache, when not present creates
  requested plot and put it to cache.
  
  Parameters
  -----------
  plot_type : str
      Type of plot to be generated
  params_values : dict
      Dict for param types as keys and Param objects as values
  cache : bool
      If serach for plot in cache and put calculated plot into cache.
  
  Returns
  --------
  PlotContainer
code: def get_plot(self, plot_type, params_values, cache=True, wait=False):
      """Returns plot for specified type and params
  
      Function serches for plot in cache, when not present creates
      requested plot and put it to cache.
  
      Parameters
      -----------
      plot_type : str
          Type of plot to be generated
      params_values : dict
          Dict for param types as keys and Param objects as values
      cache : bool
          If serach for plot in cache and put calculated plot into cache.
  
      Returns
      --------
      PlotContainer
      """
      plot_class = next(
          (
              c
              for c in self.plots
              if c.info.get("plotType") == plot_type
          ),
          None,
      )
      if plot_class is None:
          raise Exception("Not supported plot type")
      plot_type = plot_class.info.get("plotType")
      required_params_values = {}
      required_params_labels = {}
      for p in plot_class.info.get("requiredParams"):
          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(plot_type, required_params_labels)
          if cache
          else None
      )
      if result is None:
          result = plot_class(self.arena, cache=cache).fit(
              required_params_values
          )
          while wait and result.is_done == False:
              time.sleep(0.5)
              result = plot_class(self.arena, cache=cache).fit(
                  required_params_values
              )
          if cache and result.is_done != False:
              self.put_to_cache(result)
      return result
  
file_path: DALEX/python/dalex/dalex/arena/_plots_manager.py
imports: import time
  from .None import plots
  from tqdm import tqdm
  from ._plot_container import PlotContainer
label_desc: Use image node_id 7 for calling the PlotsManager obj's underlying member method code with example usage: obj.get_plot(plot_type, params_values, cache, wait) and returns: result