code: def matrix_exp(
      x: Union[ivy.Array, ivy.NativeArray],
      /,
      *,
      out: Optional[ivy.Array] = None,
  ) -> ivy.Array:
      """Compute the matrix exponential of a square matrix.
  
      Parameters
      ----------
      a
          Square matrix.
      out
          optional output array, for writing the result to. It must have a shape that the
          inputs broadcast to.
  
      Returns
      -------
      ret
          the matrix exponential of the input.
  
      Examples
      --------
          >>> x = ivy.array([[[1., 0.],
                              [0., 1.]],
                              [[2., 0.],
                              [0., 2.]]])
          >>> ivy.matrix_exp(x)
          ivy.array([[[2.7183, 1.0000],
                      [1.0000, 2.7183]],
                      [[7.3891, 1.0000],
                      [1.0000, 7.3891]]])
      """
      return current_backend(x).matrix_exp(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 5 for calling a global function with example usage: matrix_exp() and returns: current_backend