code: def is_torch_tensor(x):
      """
      Tests if `x` is a torch tensor or not. Safe to call even if torch is not installed.
      """
      return False if not is_torch_available() else _is_torch(x)
  
imports: import inspect
  import tempfile
  from collections import OrderedDict, UserDict
  from collections.abc import MutableMapping
  from contextlib import ExitStack, contextmanager
  from dataclasses import fields, is_dataclass
  from enum import Enum
  from typing import Any, ContextManager, Iterable, List, Tuple
  import numpy
  from .import_utils import is_flax_available, is_tf_available, is_torch_available, is_torch_fx_proxy
label_desc: Use image node_id 8 for calling a global function with example usage: is_torch_tensor(x) and returns: unknown