code: def where(
      condition: Union[ivy.Array, ivy.NativeArray],
      x1: Union[ivy.Array, ivy.NativeArray],
      x2: Union[ivy.Array, ivy.NativeArray],
      /,
      *,
      out: Optional[ivy.Array] = None,
  ) -> ivy.Array:
      """Return elements chosen from x or y depending on condition.
  
      Parameters
      ----------
      condition
          Where True, yield x1, otherwise yield x2.
      x1
          values from which to choose when condition is True.
      x2
          values from which to choose when condition is False.
      out
          optional output array, for writing the result to. It must have a shape that the
          inputs broadcast to.
  
      Returns
      -------
      ret
          An array with elements from x1 where condition is True, and elements from x2
          elsewhere.
  
  
      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/
      API_specification/generated/array_api.where.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:
  
      >>> condition = ivy.array([[True, False], [True, True]])
      >>> x1 = ivy.array([[1, 2], [3, 4]])
      >>> x2 = ivy.array([[5, 6], [7, 8]])
      >>> res = ivy.where(condition, x1, x2)
      >>> print(res)
      ivy.array([[1, 6],
             [3, 4]])
  
      >>> x1 = ivy.array([[6, 13, 22, 7, 12], [7, 11, 16, 32, 9]])
      >>> x2 = ivy.array([[44, 20, 8, 35, 9], [98, 23, 43, 6, 13]])
      >>> res = ivy.where(((x1 % 2 == 0) & (x2 % 2 == 1)), x1, x2)
      >>> print(res)
      ivy.array([[44, 20,  8, 35, 12],
             [98, 23, 16,  6, 13]])
  
      With :class:`ivy.Container` input:
  
      >>> x1 = ivy.Container(a=ivy.array([3, 1, 5]), b=ivy.array([2, 4, 6]))
      >>> x2 = ivy.Container(a=ivy.array([0, 7, 2]), b=ivy.array([3, 8, 5]))
      >>> condition = x1.a > x2.a
      >>> res = x1.where(condition, x2)
      >>> print(res)
      {
          a: ivy.array([1, 0, 1]),
          b: ivy.array([1, 0, 1])
      }
      """
      return current_backend(x1).where(condition, x1, x2, 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 4 for calling a global function with example usage: where() and returns: current_backend