class_docstr: Base class for all context managers for pipeline DSL.
class_docstr_tok: ["Base","class","for","all","context","managers","for","pipeline","DSL","."]
code: def __enter__(self) -> _Handle:
      if self._pushed:
          raise RuntimeError(f"{self} is already in use.")
  
      reg = dsl_context_registry.get()
      context = self.create_context()
      context.parent = reg.peek_context()
      reg.push_context(context)
      result = self.enter(context)
      self._pushed = context
      return result
  
file_path: tfx/tfx/dsl/context_managers/dsl_context_manager.py
imports: import abc
  import types
  from typing import TypeVar, Generic, Optional, Type
  from tfx.dsl.context_managers import dsl_context
  from tfx.dsl.context_managers import dsl_context_registry
label_desc: Use image node_id 4 for calling the DslContextManager obj's underlying member method code with example usage: obj.__enter__() and returns: result