code: def _enter_inference_mode(mode):
      mode_context = torch._C._InferenceMode(mode)
      mode_context.__enter__()
      return mode_context
  
imports: from typing import Any, Optional
  import torch
  from torch.utils._contextlib import _DecoratorContextManager, _NoParamDecoratorContextManager, F
label_desc: Use image node_id 1 for calling a global function with example usage: _enter_inference_mode(mode) and returns: mode_context