code: def matmul(
      x1: np.ndarray,
      x2: np.ndarray,
      /,
      *,
      transpose_a: bool = False,
      transpose_b: bool = False,
      adjoint_a: bool = False,
      adjoint_b: bool = False,
      out: Optional[np.ndarray] = None,
  ) -> np.ndarray:
      if transpose_a:
          x1 = np.swapaxes(x1, -1, -2)
      if transpose_b:
          x2 = np.swapaxes(x2, -1, -2)
      if adjoint_a:
          x1 = np.swapaxes(np.conjugate(x1), -1, -2)
      if adjoint_b:
          x2 = np.swapaxes(np.conjugate(x2), -1, -2)
      ret = np.matmul(x1, x2, out=out)
      if len(x1.shape) == len(x2.shape) == 1:
          ret = np.array(ret)
      return ret
  
imports: from collections import namedtuple
  from typing import Union, Optional, Tuple, Literal, List, NamedTuple, Sequence
  import numpy
  import ivy
  from ivy import inf
  from ivy.func_wrapper import with_unsupported_dtypes
  from ivy.functional.backends.numpy.helpers import _scalar_output_to_0d_array
  from .None import backend_version
label_desc: Use image node_id 9 for calling a global function with example usage: matmul() and returns: ret