code: def where(condition, x=None, y=None):
      """Return elements, either from x or y, depending on condition.
  
      If only condition is given, return ``condition.nonzero()``.
  
      Args:
          condition (cupy.ndarray): When True, take x, otherwise take y.
          x (cupy.ndarray): Values from which to choose on ``True``.
          y (cupy.ndarray): Values from which to choose on ``False``.
  
      Returns:
          cupy.ndarray: Each element of output contains elements of ``x`` when
          ``condition`` is ``True``, otherwise elements of ``y``. If only
          ``condition`` is given, return the tuple ``condition.nonzero()``,
          the indices where ``condition`` is True.
  
      .. warning::
  
          This function may synchronize the device if both ``x`` and ``y`` are
          omitted.
  
      .. seealso:: :func:`numpy.where`
  
      """
  
      missing = (x is None, y is None).count(True)
  
      if missing == 1:
          raise ValueError("Must provide both 'x' and 'y' or neither.")
      if missing == 2:
          return nonzero(condition)  # may synchronize
  
      if fusion._is_fusing():
          return fusion._call_ufunc(_where_ufunc, condition, x, y)
      return _where_ufunc(condition.astype("?"), x, y)
  
file_path: cupy/cupy/_sorting/search.py
imports: import cupy
  from cupy import _core
  from cupy._core import fusion
  from cupy import _util
  from cupy._core import _routines_indexing
  from cupy._core import _routines_statistics
label_desc: Use image node_id 7 for calling a global function with example usage: where(condition, x, y) and returns: _where_ufunc, nonzero, fusion