code: def _pop_mode_temporarily(k: Optional[DispatchKey] = None):
      old = _pop_mode(k)
      try:
          yield old
      finally:
          _push_mode(old, k)
  
imports: import contextlib
  from typing import Optional, Union, List, Set, Dict, Any
  import warnings
  from dataclasses import dataclass
  import torch
  import torchgen
  from torch._C import _len_torch_dispatch_stack, _get_dispatch_stack_at, _pop_torch_dispatch_stack, _push_on_torch_dispatch_stack, DispatchKey
label_desc: Use image node_id 6 for calling a global function with example usage: _pop_mode_temporarily(k) without return types