code: def tensordot(
      x1: Array,
      x2: Array,
      /,
      *,
      axes: Union[int, Tuple[Sequence[int], Sequence[int]]] = 2,
  ) -> Array:
      # Note: the restriction to numeric dtypes only is different from
      # np.tensordot.
      if (
          x1.dtype not in _numeric_dtypes
          or x2.dtype not in _numeric_dtypes
      ):
          raise TypeError(
              "Only numeric dtypes are allowed in tensordot"
          )
  
      return Array._new(np.tensordot(x1._array, x2._array, axes=axes))
  
imports: from __future__ import annotations
  import functools
  from ._dtypes import _floating_dtypes, _numeric_dtypes
  from ._manipulation_functions import reshape
  from ._array_object import Array
  from .._core.internal import _normalize_axis_indices
  from typing import TYPE_CHECKING
  from typing import NamedTuple
  import cupy
label_desc: Use image node_id 21 for calling a global function with example usage: tensordot() and returns: Array