class_docstr: Class representing a resource that need to be calculated and will be used
  by one or more charts (PlotContainer).
  Computations will run in seperate thread and can support partial results.
  
  Parameters
  ----------
  arena : dalex.Arena
      Instance of Arena.
  
  Attributes
  --------
  arena : Arena
      Instance of dalex.Arena
  params : dict
      Dictionary with required param types as keys and param labels as values.
      This attribute is set when calling fit.
  mutex : _thread.lock
      Mutex used for data and progress attributes. See __init__ code for details.
  update_events : threading.Event
      Object used to block execution until update of results.
  cancel_signal : bool
      This variable is set to signal resource it should cancel computations.
  exception: Exception
      When exception occurs during computations, then that exception is saved to this variable
  is_done : bool
      Flag set by thread when computations are done.
  progress : float
      If progress is supprted, then value should be between [0,1]. For other situations -1 value must be set.
  data : dict
      Results of computations are placed there
  thread : threading.Thread
      Thread used for computations
class_docstr_tok: ["Class","representing","a","resource","that","need","to","be","calculated","and","will","be","used","by","one","or","more","charts","(","PlotContainer",")",".","Computations","will","run","in","seperate","thread","and","can","support","partial","results",".","Parameters","--","--","--","--","--","arena",":","dalex.Arena","Instance","of","Arena",".","Attributes","--","--","--","--","arena",":","Arena","Instance","of","dalex.Arena","params",":","dict","Dictionary","with","required","param","types","as","keys","and","param","labels","as","values",".","This","attribute","is","set","when","calling","fit",".","mutex",":","_thread.lock","Mutex","used","for","data","and","progress","attributes",".","See","__init__","code","for","details",".","update_events",":","threading.Event","Object","used","to","block","execution","until","update","of","results",".","cancel_signal",":","bool","This","variable","is","set","to","signal","resource","it","should","cancel","computations",".","exception",":","Exception","When","exception","occurs","during","computations",",","then","that","exception","is","saved","to","this","variable","is_done",":","bool","Flag","set","by","thread","when","computations","are","done",".","progress",":","float","If","progress","is","supprted",",","then","value","should","be","between","[","0,1","]",".","For","other","situations","-1","value","must","be","set",".","data",":","dict","Results","of","computations","are","placed","there","thread",":","threading.Thread","Thread","used","for","computations"]
code: def _init_thread(self, kwargs):
      try:
          self._fit(**kwargs)
      except Exception as e:
          with self.mutex:
              self.exception = e
  
file_path: DALEX/python/dalex/dalex/arena/_resource.py
imports: import threading
  from .params import Param
  from ._option_base import OptionBase
label_desc: Use image node_id 4 for calling the Resource obj's underlying member method code with example usage: obj._init_thread(kwargs) without return types