code: def tensordot(a, b, axes=2):
      """Returns the tensor dot product of two arrays along specified axes.
  
      This is equivalent to compute dot product along the specified axes which
      are treated as one axis by reshaping.
  
      Args:
          a (:class:`~chainer.Variable` or :ref:`ndarray`): The first argument.
          b (:class:`~chainer.Variable` or :ref:`ndarray`): The second argument.
          axes:
              - If it is an integer, then ``axes`` axes at the last of ``a`` and
                the first of ``b`` are used.
              - If it is a pair of sequences of integers, then these two
                sequences specify the list of axes for ``a`` and ``b``. The
                corresponding axes are paired for sum-product.
  
      Returns:
          ~chainer.Variable: The tensor dot product of ``a`` and ``b`` along the
          axes specified by ``axes``.
  
      .. admonition:: Example
  
          >>> a = np.random.rand(5, 3, 2)
          >>> b = np.random.rand(3, 2, 4)
          >>> c = F.tensordot(a, b, axes=2)
          >>> c.shape
          (5, 4)
  
      .. seealso:: :func:`numpy.tensordot`
  
      """
      return TensorDot(axes=axes).apply((a, b))[0]
  
file_path: chainer/chainer/functions/math/tensordot.py
imports: import numpy
  import six
  from chainer import backend
  from chainer import function_node
  from chainer import utils
  from chainer.utils import collections_abc
  from chainer.utils import type_check
label_desc: Use image node_id 2 for calling a global function with example usage: tensordot(a, b, axes) and returns: TensorDot