code: def __enter__(self):
      def _get_prev_mode():
          if self._dispatch_key == torch._C.DispatchKey.PreDispatch:
              return _get_dispatch_mode_pre_dispatch(
                  torch._C._TorchDispatchModeKey.FUNCTIONAL
              )
          return torch._C._get_dispatch_mode(
              torch._C._TorchDispatchModeKey.FUNCTIONAL
          )
  
      if _get_prev_mode() is None:
          self.enter_stack.append(True)
          return super().__enter__()
      else:
          self.enter_stack.append(False)
          return self
  
imports: import contextlib
  from abc import ABC, abstractmethod
  from typing import Any, Callable, ContextManager, Tuple
  import torch
  import torch.utils._pytree
  from torch._C import _functionalization_reapply_views_tls
  from torch._ops import _get_dispatch_mode_pre_dispatch
  from torch.utils._python_dispatch import _detect_functional_mode, return_and_correct_aliasing, TorchDispatchMode
label_desc: Use image node_id 2 for calling the FunctionalTensorMode obj's underlying member method code with example usage: obj.__enter__() and returns: torch, super, self, _get_dispatch_mode_pre_dispatch