class_docstr: ExplainerComponent is a bundle of a dash layout and callbacks that
  make use of an Explainer object.
  
  An ExplainerComponent can have ExplainerComponent subcomponents, that
  you register with register_components(). If the component depends on
  certain lazily calculated Explainer properties, you can register these
  with register_dependencies().
  
  ExplainerComponent makes sure that:
  
  1. Callbacks of subcomponents are registered.
  2. Lazily calculated dependencies (even of subcomponents) can be calculated.
  3. Pos labels selector id's of all subcomponents can be calculated.
  
  Each ExplainerComponent adds a unique uuid name string to all elements, so
  that there is never a name clash even with multiple ExplanerComponents of
  the same type in a layout.
  
  Important:
      define your callbacks in component_callbacks() and
      ExplainerComponent will register callbacks of subcomponents in addition
      to component_callbacks() when calling register_callbacks()
class_docstr_tok: ["ExplainerComponent","is","a","bundle","of","a","dash","layout","and","callbacks","that","make","use","of","an","Explainer","object",".","An","ExplainerComponent","can","have","ExplainerComponent","subcomponents",",","that","you","register","with","register_components","(",")",".","If","the","component","depends","on","certain","lazily","calculated","Explainer","properties",",","you","can","register","these","with","register_dependencies","(",")",".","ExplainerComponent","makes","sure","that",":","1",".","Callbacks","of","subcomponents","are","registered",".","2",".","Lazily","calculated","dependencies","(","even","of","subcomponents",")","can","be","calculated",".","3",".","Pos","labels","selector","id","'s","of","all","subcomponents","can","be","calculated",".","Each","ExplainerComponent","adds","a","unique","uuid","name","string","to","all","elements",",","so","that","there","is","never","a","name","clash","even","with","multiple","ExplanerComponents","of","the","same","type","in","a","layout",".","Important",":","define","your","callbacks","in","component_callbacks","(",")","and","ExplainerComponent","will","register","callbacks","of","subcomponents","in","addition","to","component_callbacks","(",")","when","calling","register_callbacks","(",")"]
docstr: register subcomponents so that their callbacks will be registered
  and dependencies can be tracked
  
  Args:
      scan_self (bool, optional): scan self.__dict__ and add all
      ExplainerComponent attributes to _components. Defaults to True
code: def register_components(self, *components):
      """register subcomponents so that their callbacks will be registered
      and dependencies can be tracked
  
      Args:
          scan_self (bool, optional): scan self.__dict__ and add all
          ExplainerComponent attributes to _components. Defaults to True
      """
      if not hasattr(self, "_components"):
          self._components = []
      if not hasattr(self, "_exclude_components"):
          self._exclude_components = []
      for comp in components:
          if (
              isinstance(comp, ExplainerComponent)
              and comp not in self._components
              and comp not in self._exclude_components
          ):
              self._components.append(comp)
          elif hasattr(comp, "__iter__"):
              for subcomp in comp:
                  if (
                      isinstance(subcomp, ExplainerComponent)
                      and subcomp not in self._components
                      and subcomp not in self._exclude_components
                  ):
                      self._components.append(subcomp)
                  else:
                      print(
                          f"{subcomp.__name__} is not an ExplainerComponent so not adding to self.components"
                      )
          else:
              print(
                  f"{comp.__name__} is not an ExplainerComponent so not adding to self.components"
              )
  
      for k, v in self.__dict__.items():
          if (
              k != "_components"
              and isinstance(v, ExplainerComponent)
              and v not in self._components
              and v not in self._exclude_components
          ):
              self._components.append(v)
  
imports: import sys
  from abc import ABC
  import inspect
  import types
  from typing import Union, List, Tuple
  from pathlib import Path
  from importlib import import_module
  import socket
  import dash
  from dash import html, dcc, Input, Output, State
  from dash.exceptions import PreventUpdate
  import dash_bootstrap_components
  from .None import to_html
label_desc: Use image node_id 4 for calling the ExplainerComponent obj's underlying member method code with example usage: obj.register_components() without return types