code: def einsum_tensordot(A, B, axes, reverse=False):
      # Does tensor dot product using einsum, which shouldn't require a copy.
      A_axnums = list(range(A.ndim))
      B_axnums = list(range(A.ndim, A.ndim + B.ndim))
      sum_axnum = A.ndim + B.ndim
      for i_sum, (i_A, i_B) in enumerate(zip(*axes)):
          A_axnums[i_A] = sum_axnum + i_sum
          B_axnums[i_B] = sum_axnum + i_sum
      return npo.einsum(A, A_axnums, B, B_axnums)
  
file_path: autograd/autograd/scipy/signal.py
imports: from __future__ import absolute_import
  from builtins import range, zip
  from functools import partial
  import autograd.numpy
  import numpy
  from autograd.extend import primitive, defvjp
  from numpy.lib.stride_tricks import as_strided
  from six import iteritems
label_desc: Use image node_id 2 for calling a global function with example usage: einsum_tensordot(A, B, axes, reverse) and returns: npo