code: def det(
      x: Union[ivy.Array, ivy.NativeArray],
      /,
      *,
      out: Optional[ivy.Array] = None,
  ) -> ivy.Array:
      """Return the determinant of a square matrix (or a stack of square
      matrices)``x``.
  
      Parameters
      ----------
      x
          input array having shape ``(..., M, M)`` and whose innermost two dimensions
          form square matrices. Should have a floating-point data type.
      out
          optional output array, for writing the result to. It must have a shape that the
          inputs broadcast to.
  
      Returns
      -------
      ret
          if ``x`` is a two-dimensional array, a zero-dimensional array containing the
          determinant; otherwise,a non-zero dimensional array containing the determinant
          for each square matrix. The returned array must have the same data type as
          ``x``.
  
  
      This function conforms to the `Array API Standard
      <https://data-apis.org/array-api/latest/>`_. This docstring is an extension of the
      `docstring <https://data-apis.org/array-api/latest/
      extensions/generated/array_api.linalg.det.html>`_
      in the standard.
  
      Both the description and the type hints above assumes an array input for simplicity,
      but this function is *nestable*, and therefore also accepts :class:`ivy.Container`
      instances in place of any of the arguments.
  
      Examples
      --------
      With :class:`ivy.Array` input:
  
      >>> x = ivy.array([[2.,4.],[6.,7.]])
      >>> y = ivy.det(x)
      >>> print(y)
      ivy.array(-10.)
  
      >>> x = ivy.array([[3.4,-0.7,0.9],[6.,-7.4,0.],[-8.5,92,7.]])
      >>> y = ivy.det(x)
      >>> print(y)
      ivy.array(293.46997)
  
      With :class:`ivy.NativeArray` input:
  
      >>> x = ivy.native_array([[3.4,-0.7,0.9],[6.,-7.4,0.],[-8.5,92,7.]])
      >>> y = ivy.det(x)
      >>> print(y)
      ivy.array(293.46997)
  
      With :class:`ivy.Container` input:
  
      >>> x = ivy.Container(a = ivy.array([[3., -1.], [-1., 3.]]) ,
      ...                   b = ivy.array([[2., 1.], [1., 1.]]))
      >>> y = ivy.det(x)
      >>> print(y)
      {a:ivy.array(8.),b:ivy.array(1.)}
      """
      return current_backend(x).det(x, out=out)
  
imports: from typing import Union, Optional, Tuple, Literal, List, Sequence
  import ivy
  from ivy.utils.backend import current_backend
  from ivy.func_wrapper import handle_array_function, to_native_arrays_and_back, handle_out_argument, handle_nestable, handle_array_like_without_promotion, handle_device, handle_backend_invalid
  from ivy.utils.exceptions import handle_exceptions
label_desc: Use image node_id 3 for calling a global function with example usage: det() and returns: current_backend