code: def _where(condition: ArrayLike, x: ArrayLike, y: ArrayLike) -> Array:
      if x is None or y is None:
          raise ValueError(
              "Either both or neither of the x and y arguments should "
              "be provided to jax.numpy.where, got {} and {}.".format(
                  x, y
              )
          )
      if not np.issubdtype(_dtype(condition), np.bool_):
          condition = lax.ne(condition, lax._zero(condition))
      x, y = promote_dtypes(x, y)
      condition_arr, x_arr, y_arr = _broadcast_arrays(condition, x, y)
      try:
          is_always_empty = core.is_empty_shape(x_arr.shape)
      except:
          is_always_empty = False  # can fail with dynamic shapes
      return (
          lax.select(condition_arr, x_arr, y_arr)
          if not is_always_empty
          else x_arr
      )
  
imports: from __future__ import annotations
  from collections.abc import Sequence
  from functools import partial
  import re
  import textwrap
  from typing import Any, Callable, NamedTuple, TypeVar
  import warnings
  from jax._src import api
  from jax._src import config
  from jax._src import core
  from jax._src import dtypes
  from jax._src.lax import lax
  from jax._src.util import safe_zip, safe_map
  from jax._src.typing import Array, ArrayLike, DimSize, DType, DTypeLike, Shape
  import numpy
label_desc: Use image node_id 22 for calling a global function with example usage: _where(condition, x, y) and returns: unknown