docstr: Dynamically import and load class
  
  Args:
      report (Report): report object
      package (str): component package
      module (str): component module name
      name (str): component class name
      attr (dict): component class attributes in dict
      level (int): content level
  Returns: class object
docstr_tok: ["Dynamically","import","and","load","class","Args",":","report","(","Report",")",":","report","object","package","(","str",")",":","component","package","module","(","str",")",":","component","module","name","name","(","str",")",":","component","class","name","attr","(","dict",")",":","component","class","attributes","in","dict","level","(","int",")",":","content","level","Returns",":","class","object"]
code: def factory(
      report: Report,
      package: str,
      module: str,
      name: str,
      attr: dict,
      level=None,
  ):
      """
      Dynamically import and load class
  
      Args:
          report (Report): report object
          package (str): component package
          module (str): component module name
          name (str): component class name
          attr (dict): component class attributes in dict
          level (int): content level
      Returns: class object
      """
      imported_module = import_module("." + module, package=package)
      cls = getattr(imported_module, name)
      obj = cls(attr)
      obj(report=report, level=level)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import warnings
  import json
  from enum import Enum
  from importlib import import_module
  from pathlib import Path
  import numpy
  import pandas
  import yaml
  from jsonschema import validate
  from xai.exception import CompilerException
  from xai.formatter import Report
label_desc: Use image node_id 5 for calling the Controller obj's underlying member method code with example usage: obj.factory(report, package, module, name, attr, level) without return types