code: def where(
      condition: paddle.Tensor,
      x1: Union[float, int, paddle.Tensor],
      x2: Union[float, int, paddle.Tensor],
      /,
      *,
      out: Optional[paddle.Tensor] = None,
  ) -> paddle.Tensor:
      x1, x2, ret_dtype = _elementwise_helper(x1, x2)
      arrays = [condition, x1, x2]
      scalar_out = all(map(lambda x: x.ndim == 0, arrays))
      for i, array in enumerate(arrays):
          if array.ndim == 0:
              arrays[i] = paddle_backend.expand_dims(array, axis=0)
      condition, x1, x2 = arrays
      condition = (
          condition.cast("bool")
          if condition.dtype != paddle.bool
          else condition
      )
  
      if ret_dtype in [
          paddle.int8,
          paddle.int16,
          paddle.uint8,
          paddle.float16,
          paddle.bool,
      ]:
          x1 = x1.cast("float32")
          x2 = x2.cast("float32")
          result = paddle.where(condition, x1, x2)
      elif ret_dtype in [paddle.complex64, paddle.complex128]:
          result_real = paddle.where(
              condition, paddle.real(x1), paddle.real(x2)
          )
          result_imag = paddle.where(
              condition, paddle.imag(x1), paddle.imag(x2)
          )
          result = paddle.complex(result_real, result_imag)
      else:
          result = paddle.where(condition, x1, x2)
  
      return (
          result.squeeze().cast(ret_dtype)
          if scalar_out
          else result.cast(ret_dtype)
      )
  
file_path: ivy/ivy/functional/backends/paddle/searching.py
imports: from numbers import Number
  from typing import Optional, Tuple, Union
  import paddle
  import ivy.functional.backends.paddle
  import ivy
  from ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes
  from .None import backend_version
  from .elementwise import _elementwise_helper
label_desc: Use image node_id 4 for calling a global function with example usage: where() and returns: unknown