code: def multi_dot(
      x: Sequence[Union[ivy.Array, ivy.NativeArray]],
      /,
      *,
      out: Optional[ivy.Array] = None,
  ) -> ivy.Array:
      """Compute the dot product of two or more matrices in a single function
      call, while selecting the fastest evaluation order.
  
      Parameters
      ----------
      x
          sequence of matrices to multiply.
      out
          optional output array, for writing the result to. It must have a valid
          shape, i.e. the resulting shape after applying regular matrix multiplication
          to the inputs.
  
      Returns
      -------
      ret
          dot product of the arrays.
  
      Examples
      --------
      With :class:`ivy.Array` input:
  
      >>> A = ivy.arange(2 * 3).reshape((2, 3))
      >>> B = ivy.arange(3 * 2).reshape((3, 2))
      >>> C = ivy.arange(2 * 2).reshape((2, 2))
      >>> ivy.multi_dot((A, B, C))
      ivy.array([[ 26,  49],
                 [ 80, 148]])
  
      >>> A = ivy.arange(2 * 3).reshape((2, 3))
      >>> B = ivy.arange(3 * 2).reshape((3, 2))
      >>> C = ivy.arange(2 * 2).reshape((2, 2))
      >>> D = ivy.zeros((2, 2))
      >>> ivy.multi_dot((A, B, C), out=D)
      >>> print(D)
      ivy.array([[ 26,  49],
                 [ 80, 148]])
      """
      return current_backend(x).multi_dot(x, out=out)
  
imports: import logging
  from typing import Union, Optional, Tuple, List, Sequence, Literal
  import ivy
  from ivy.utils.backend import current_backend
  from ivy.func_wrapper import to_native_arrays_and_back, handle_out_argument, handle_nestable, handle_array_like_without_promotion, handle_array_function, handle_device, inputs_to_ivy_arrays, handle_backend_invalid
  from ivy.utils.exceptions import handle_exceptions
label_desc: Use image node_id 10 for calling a global function with example usage: multi_dot() and returns: current_backend