class_docstr: Subclass of :py:class:`monai.bundle.ConfigItem`, the `ConfigItem` represents an executable expression
  (execute based on ``eval()``, or import the module to the `globals` if it's an import statement).
  
  See also:
  
      - https://docs.python.org/3/library/functions.html#eval.
  
  For example:
  
  .. code-block:: python
  
      import monai
      from monai.bundle import ConfigExpression
  
      config = "$monai.__version__"
      expression = ConfigExpression(config, id="test", globals={"monai": monai})
      print(expression.evaluate())
  
  Args:
      config: content of a config item.
      id: name of current config item, defaults to empty string.
      globals: additional global context to evaluate the string.
class_docstr_tok: ["Subclass","of",":","py",":","class",":","`","monai.bundle.ConfigItem","`",",","the","`","ConfigItem","`","represents","an","executable","expression","(","execute","based","on","``","eval","(",")","``",",","or","import","the","module","to","the","`","globals","`","if","it","'s","an","import","statement",")",".","See","also",":","-","https",":","\/\/docs.python.org\/3\/library\/functions.html","#","eval",".","For","example",":","..","code-block",":",":","python","import","monai","from","monai.bundle","import","ConfigExpression","config","=","``","$","monai.__version__","''","expression","=","ConfigExpression","(","config",",","id=","''","test","''",",","globals=","{","``","monai","''",":","monai","}",")","print","(","expression.evaluate","(",")",")","Args",":","config",":","content","of","a","config","item",".","id",":","name","of","current","config","item",",","defaults","to","empty","string",".","globals",":","additional","global","context","to","evaluate","the","string","."]
docstr: Execute the current config content and return the result if it is expression, based on Python `eval()`.
  For more details: https://docs.python.org/3/library/functions.html#eval.
  
  Args:
      globals: besides ``self.globals``, other global symbols used in the expression at runtime.
      locals: besides ``globals``, may also have some local symbols used in the expression at runtime.
code: def evaluate(
      self, globals: dict | None = None, locals: dict | None = None
  ) -> str | Any | None:
      """
      Execute the current config content and return the result if it is expression, based on Python `eval()`.
      For more details: https://docs.python.org/3/library/functions.html#eval.
  
      Args:
          globals: besides ``self.globals``, other global symbols used in the expression at runtime.
          locals: besides ``globals``, may also have some local symbols used in the expression at runtime.
  
      """
      value = self.get_config()
      if not ConfigExpression.is_expression(value):
          return None
      optional_module = self._parse_import_string(
          value[len(self.prefix) :]
      )
      if optional_module is not None:
          return optional_module
      if not self.run_eval:
          return f"{value[len(self.prefix) :]}"
      globals_ = dict(self.globals)
      if globals is not None:
          for k, v in globals.items():
              if k in globals_:
                  warnings.warn(
                      f"the new global variable `{k}` conflicts with `self.globals`, override it."
                  )
              globals_[k] = v
      if not run_debug:
          try:
              return eval(value[len(self.prefix) :], globals_, locals)
          except Exception as e:
              raise RuntimeError(f"Failed to evaluate {self}") from e
      warnings.warn(
          f"\n\npdb: value={value}\n"
          f"See also Debugger commands documentation: https://docs.python.org/3/library/pdb.html\n"
      )
      import pdb
  
      pdb.run(value[len(self.prefix) :], globals_, locals)
      return None
  
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 3 for calling the ConfigExpression obj's underlying member method code with example usage: obj.evaluate(globals, locals) and returns: None, None, optional_module, value, eval