code: def argwhere(
      x: Union[ivy.Array, ivy.NativeArray],
      /,
      *,
      out: Optional[ivy.Array] = None,
  ) -> ivy.Array:
      """Return the indices of all non-zero elements of the input array.
  
      Parameters
      ----------
      x
          input array, for which indices are desired.
      out
          optional output array, for writing the result to. It must have a shape that the
          inputs broadcast to.
  
      Returns
      -------
      ret
          Indices of non-zero elements.
  
      Examples
      --------
      With :class:`ivy.Array` input:
  
      >>> x = ivy.array([[1, 2], [3, 4]])
      >>> res = ivy.argwhere(x)
      >>> print(res)
      ivy.array([[0, 0], [0, 1], [1, 0], [1, 1]])
  
      >>> x = ivy.array([[0, 2], [3, 4]])
      >>> res = ivy.argwhere(x)
      >>> print(res)
      ivy.array([[0, 1], [1, 0], [1, 1]])
  
      >>> x = ivy.array([[0, 2], [3, 4]])
      >>> y = ivy.zeros((3, 2), dtype=ivy.int64)
      >>> res = ivy.argwhere(x, out=y)
      >>> print(res)
      ivy.array([[0, 1], [1, 0], [1, 1]])
  
      With a :class:`ivy.Container` input:
  
      >>> x = ivy.Container(a=ivy.array([1, 2]), b=ivy.array([3, 4]))
      >>> res = ivy.argwhere(x)
      >>> print(res)
      {
          a: ivy.array([[0], [1]]),
          b: ivy.array([[0], [1]])
      }
  
      >>> x = ivy.Container(a=ivy.array([1, 0]), b=ivy.array([3, 4]))
      >>> res = ivy.argwhere(x)
      >>> print(res)
      {
          a: ivy.array([[0]]),
          b: ivy.array([[0], [1]])
      }
      """
      return current_backend(x).argwhere(x, out=out)
  
file_path: ivy/ivy/functional/ivy/searching.py
imports: from numbers import Number
  from typing import Union, Optional, Tuple
  import ivy
  from ivy.utils.backend import current_backend
  from ivy.utils.exceptions import handle_exceptions
  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
label_desc: Use image node_id 5 for calling a global function with example usage: argwhere() and returns: current_backend