code: def _functorch_wrapper_str_intern(tensor, *, tensor_contents=None):
      level = torch._C._functorch.maybe_get_level(tensor)
      assert level != -1
  
      if torch._C._functorch.is_functionaltensor(tensor):
          # Since we're unwrapping the FunctionalTensorWrapper, we need to make sure
          # that it's up to date first
          torch._sync(tensor)
  
      value = torch._C._functorch.get_unwrapped(tensor)
      value_repr = repr(value)
  
      indented_value_repr = textwrap.indent(value_repr, " " * 4)
      if torch._C._functorch.is_batchedtensor(tensor):
          bdim = torch._C._functorch.maybe_get_bdim(tensor)
          assert bdim != -1
          return (
              f"BatchedTensor(lvl={level}, bdim={bdim}, value=\n"
              f"{indented_value_repr}\n"
              f")"
          )
      if torch._C._functorch.is_gradtrackingtensor(tensor):
          return (
              f"GradTrackingTensor(lvl={level}, value=\n"
              f"{indented_value_repr}\n"
              f")"
          )
      if torch._C._functorch.is_functionaltensor(tensor):
          return (
              f"FunctionalTensor(lvl={level}, value=\\\n{value_repr})"
          )
  
      raise ValueError(
          "We don't know how to print this, please file us an issue"
      )
  
imports: import contextlib
  import dataclasses
  import math
  import textwrap
  from typing import Any, Dict, Optional
  import torch
  from torch import inf
label_desc: Use image node_id 12 for calling a global function with example usage: _functorch_wrapper_str_intern(tensor) and returns: str, level, str, bdim, str, indented_value_repr, str, str, level, str, indented_value_repr, str, str, level, str, value_repr, str