class_docstr: Subclass of :py:class:`monai.bundle.ConfigItem`, this class uses a dictionary with string keys to
  represent a component of `class` or `function` and supports instantiation.
  
  Currently, three special keys (strings surrounded by ``_``) are defined and interpreted beyond the regular literals:
  
      - class or function identifier of the python module, specified by ``"_target_"``,
        indicating a monai built-in Python class or function such as ``"LoadImageDict"``,
        or a full module name, e.g. ``"monai.transforms.LoadImageDict"``, or a callable, e.g. ``"$@model.forward"``.
      - ``"_requires_"`` (optional): specifies reference IDs (string starts with ``"@"``) or ``ConfigExpression``
        of the dependencies for this ``ConfigComponent`` object. These dependencies will be
        evaluated/instantiated before this object is instantiated.  It is useful when the
        component doesn't explicitly depend on the other `ConfigItems` via its arguments,
        but requires the dependencies to be instantiated/evaluated beforehand.
      - ``"_disabled_"`` (optional): a flag to indicate whether to skip the instantiation.
      - ``"_desc_"`` (optional): free text descriptions of the component for code readability.
      - ``"_mode_"`` (optional): operating mode for invoking the callable ``component`` defined by ``"_target_"``:
  
          - ``"default"``: returns ``component(**kwargs)``
          - ``"partial"``: returns ``functools.partial(component, **kwargs)``
          - ``"debug"``: returns ``pdb.runcall(component, **kwargs)``
  
  Other fields in the config content are input arguments to the python module.
  
  .. code-block:: python
  
      from monai.bundle import ComponentLocator, ConfigComponent
  
      locator = ComponentLocator(excludes=["modules_to_exclude"])
      config = {
          "_target_": "LoadImaged",
          "keys": ["image", "label"]
      }
  
      configer = ConfigComponent(config, id="test", locator=locator)
      image_loader = configer.instantiate()
      print(image_loader)  # <monai.transforms.io.dictionary.LoadImaged object at 0x7fba7ad1ee50>
  
  Args:
      config: content of a config item.
      id: name of the current config item, defaults to empty string.
      locator: a ``ComponentLocator`` to convert a module name string into the actual python module.
          if `None`, a ``ComponentLocator(excludes=excludes)`` will be used.
      excludes: if ``locator`` is None, create a new ``ComponentLocator`` with ``excludes``.
          See also: :py:class:`monai.bundle.ComponentLocator`.
class_docstr_tok: ["Subclass","of",":","py",":","class",":","`","monai.bundle.ConfigItem","`",",","this","class","uses","a","dictionary","with","string","keys","to","represent","a","component","of","`","class","`","or","`","function","`","and","supports","instantiation",".","Currently",",","three","special","keys","(","strings","surrounded","by","``","_","``",")","are","defined","and","interpreted","beyond","the","regular","literals",":","-","class","or","function","identifier","of","the","python","module",",","specified","by","``","``","_target_","''","``",",","indicating","a","monai","built-in","Python","class","or","function","such","as","``","``","LoadImageDict","''","``",",","or","a","full","module","name",",","e.g",".","``","``","monai.transforms.LoadImageDict","''","``",",","or","a","callable",",","e.g",".","``","``","$","@","model.forward","''","``",".","-","``","``","_requires_","''","``","(","optional",")",":","specifies","reference","IDs","(","string","starts","with","``","``","@","''","``",")","or","``","ConfigExpression","``","of","the","dependencies","for","this","``","ConfigComponent","``","object",".","These","dependencies","will","be","evaluated\/instantiated","before","this","object","is","instantiated",".","It","is","useful","when","the","component","does","n't","explicitly","depend","on","the","other","`","ConfigItems","`","via","its","arguments",",","but","requires","the","dependencies","to","be","instantiated\/evaluated","beforehand",".","-","``","``","_disabled_","''","``","(","optional",")",":","a","flag","to","indicate","whether","to","skip","the","instantiation",".","-","``","``","_desc_","''","``","(","optional",")",":","free","text","descriptions","of","the","component","for","code","readability",".","-","``","``","_mode_","''","``","(","optional",")",":","operating","mode","for","invoking","the","callable","``","component","``","defined","by","``","``","_target_","''","``",":","-","``","``","default","''","``",":","returns","``","component","(","*","*","kwargs",")","``","-","``","``","partial","''","``",":","returns","``","functools.partial","(","component",",","*","*","kwargs",")","``","-","``","``","debug","''","``",":","returns","``","pdb.runcall","(","component",",","*","*","kwargs",")","``","Other","fields","in","the","config","content","are","input","arguments","to","the","python","module",".","..","code-block",":",":","python","from","monai.bundle","import","ComponentLocator",",","ConfigComponent","locator","=","ComponentLocator","(","excludes=","[","``","modules_to_exclude","''","]",")","config","=","{","``","_target_","''",":","``","LoadImaged","''",",","``","keys","''",":","[","``","image","''",",","``","label","''","]","}","configer","=","ConfigComponent","(","config",",","id=","''","test","''",",","locator=locator",")","image_loader","=","configer.instantiate","(",")","print","(","image_loader",")","#","<","monai.transforms.io.dictionary.LoadImaged","object","at","0x7fba7ad1ee50",">","Args",":","config",":","content","of","a","config","item",".","id",":","name","of","the","current","config","item",",","defaults","to","empty","string",".","locator",":","a","``","ComponentLocator","``","to","convert","a","module","name","string","into","the","actual","python","module",".","if","`","None","`",",","a","``","ComponentLocator","(","excludes=excludes",")","``","will","be","used",".","excludes",":","if","``","locator","``","is","None",",","create","a","new","``","ComponentLocator","``","with","``","excludes","``",".","See","also",":",":","py",":","class",":","`","monai.bundle.ComponentLocator","`","."]
code: def __init__(
      self,
      config: Any,
      id: str = "",
      locator: ComponentLocator | None = None,
      excludes: Sequence[str] | str | None = None,
  ) -> None:
      super().__init__(config=config, id=id)
      self.locator = (
          ComponentLocator(excludes=excludes)
          if locator is None
          else locator
      )
  
imports: from __future__ import annotations
  import ast
  import inspect
  import sys
  import warnings
  from abc import ABC, abstractmethod
  from collections.abc import Mapping, Sequence
  from importlib import import_module
  from pprint import pformat
  from typing import Any
  from monai.bundle.utils import EXPR_KEY
  from monai.utils import CompInitMode, ensure_tuple, first, instantiate, optional_import, run_debug, run_eval
label_desc: Use image node_id 1 to create a new ConfigComponent object from inherited base classes: ConfigItem, Instantiable with example: obj = ConfigComponent(config, id, locator, excludes)