code: def append(self, component):
      if not isinstance(component, Component):
          raise Exception(
              f"Can't append object of type {type(component)} to this object."
          )
  
      self.components[type(component)] = component
      for field_name, field_value in component.fields.items():
          self.__setattr__(field_name, field_value)
          self._field_components_map[field_name] = type(component)
  
      return self
  
file_path: interpret/python/interpret-api/interpret/newapi/explanation.py
imports: import json
  from slicer import Slicer
  from interpret.newapi.component import Component
label_desc: Use image node_id 3 for calling the Explanation obj's underlying member method code with example usage: obj.append(component) and returns: self