code: def tensordot(a, b, axes=2):
      r"""
      Returns a tensor contraction of `a` and `b` over specific axes.
  
      Notes
      -----
      `tensordot` is an alias for `tensordot`. It is a standard API in
      https://data-apis.org/array-api/latest/extensions/linear_algebra_functions.html#linalg-tensordot-x1-x2-axes-2
      instead of an official NumPy operator.
  
      Parameters
      ----------
      a : ndarray
          First input array. Should have a numeric data type.
      b : ndarray
          Second input array. Must be compatible with `a` (see Broadcasting). Should have a numeric data type.
      axes : int, tuple
          Number of axes to contract or explicit sequences of axes for `a` and `b`, respectively.
          If axes is an int equal to `N` , then contraction must be performed over the last `N` axes of `a`
          and the first `N` axes of `b` in order.
          The size of each corresponding axis (dimension) must match. Must be nonnegative.
  
          If N equals 0 , the result is the tensor (outer) product.
          If N equals 1 , the result is the tensor dot product.
          If N equals 2 , the result is the tensor double contraction (default).
  
          Default: 2.
  
      Returns
      ----------
      out : ndarray
          An array containing the tensor contraction whose shape consists of the non-contracted axes (dimensions) of the
          first array `a`, followed by the non-contracted axes (dimensions) of the second array `b`.
  
      Examples
      --------
      >>> x = np.arange(60.).reshape(3,4,5)
      >>> y = np.arange(24.).reshape(4,3,2)
      >>> z = np.linalg.tensordot(x, y, axes=([1,0],[0,1]))
      >>> z.shape
      (5, 2)
      >>> z
      array([[ 4400.,  4730.],
             [ 4532.,  4874.],
             [ 4664.,  5018.],
             [ 4796.,  5162.],
             [ 4928.,  5306.]])
      """
      return _mx_nd_np.tensordot(a, b, axes)
  
imports: from functools import reduce
  from ..ndarray import numpy
  from ..util import wrap_data_api_linalg_func
  from .fallback_linalg import *
  from .None import fallback_linalg
label_desc: Use image node_id 4 for calling a global function with example usage: tensordot(a, b, axes) and returns: _mx_nd_np