code: def execute(cls, ctx, op):
      (a, b), device_id, xp = as_same_device(
          [ctx[c.key] for c in op.inputs],
          device=op.device,
          ret_extra=True,
      )
  
      axes = op.a_axes, op.b_axes
      with device(device_id):
          if not op.sparse and is_sparse_module(xp):
              # tell sparse to do calculation on numpy or cupy dot
              ctx[op.outputs[0].key] = xp.tensordot(
                  a, b, axes, sparse=False
              )
          else:
              ret = xp.tensordot(a, b, axes)
              out = op.outputs[0]
              ctx[out.key] = ret.astype(
                  ret.dtype, order=out.order.value, copy=False
              )
  
imports: import itertools
  from collections.abc import Iterable
  import numpy
  from ...None import opcodes
  from ...serialization.serializables import FieldTypes, KeyField, TupleField
  from ...utils import has_unknown_shape
  from ..utils import unify_chunks
  from ..array_utils import as_same_device, device, is_sparse_module
  from ..operands import TensorOperand, TensorOperandMixin
  from ..arithmetic.utils import chunk_tree_add
  from ..datasource import tensor
  from ..core import TensorOrder
label_desc: Use image node_id 10 for calling the TensorTensorDot obj's underlying member method code with example usage: obj.execute(cls, ctx, op) without return types