code: def add_component(self, obj):
      if inspect.isclass(obj) and self.base_class in obj.__bases__:
          name = obj.__name__
          classifier = obj
      else:
          raise TypeError(
              "add_component works only with a subclass of %s"
              % str(self.base_class)
          )
  
      properties = set(classifier.get_properties())
      should_be_there = {
          "shortname",
          "name",
          "handles_regression",
          "handles_classification",
          "handles_multiclass",
          "handles_multilabel",
          "handles_multioutput",
          "is_deterministic",
          "input",
          "output",
      }
      for property in properties:
          if property not in should_be_there:
              raise ValueError(
                  "Property %s must not be specified for "
                  "algorithm %s. Only the following properties "
                  "can be specified: %s"
                  % (property, name, str(should_be_there))
              )
      for property in should_be_there:
          if property not in properties:
              raise ValueError(
                  "Property %s not specified for algorithm %s"
                  % (property, name)
              )
  
      self.components[name] = classifier
  
imports: from typing import Dict, Optional
  import importlib
  import inspect
  import pkgutil
  import sys
  from collections import OrderedDict
  from sklearn.base import BaseEstimator, TransformerMixin
  from autosklearn.askl_typing import FEAT_TYPE_TYPE
  from autosklearn.pipeline.constants import SPARSE
label_desc: Use image node_id 2 for calling the ThirdPartyComponents obj's underlying member method code with example usage: obj.add_component(obj) without return types