code: def wrap_tensors(self, args: Tuple[Any]) -> Tuple[Any]:
      if self.pre_dispatch:
          with FunctionalTensorMode(True):
              return torch.utils._pytree.tree_map_only(
                  torch.Tensor, FunctionalTensor.to_functional, args
              )
      with FunctionalTensorMode():
          return torch.utils._pytree.tree_map_only(
              torch.Tensor, FunctionalTensor.to_functional, args
          )
  
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 PythonFunctionalizeAPI obj's underlying member method code with example usage: obj.wrap_tensors(args) and returns: torch, torch