code: def matmul(tensor1, tensor2, like=None):
      """Returns the matrix product of two tensors."""
      if like == "torch":
          if get_interface(tensor1) != "torch":
              tensor1 = ar.numpy.asarray(tensor1, like="torch")
          if get_interface(tensor2) != "torch":
              tensor2 = ar.numpy.asarray(tensor2, like="torch")
          tensor2 = cast_like(
              tensor2, tensor1
          )  # pylint: disable=arguments-out-of-order
      return ar.numpy.matmul(tensor1, tensor2, like=like)
  
imports: import functools
  from collections.abc import Sequence
  import autoray
  import numpy
  from autograd.numpy.numpy_boxes import ArrayBox
  from autoray import numpy
  from numpy import ndarray
  from .None import single_dispatch
  from .utils import cast, cast_like, get_interface, requires_grad
label_desc: Use image node_id 8 for calling a global function with example usage: matmul(tensor1, tensor2, like) and returns: ar