code: def where(condition, x=None, y=None):
      if (x is None) != (y is None):
          raise ValueError(
              "either both or neither of x and y should be given"
          )
      if (x is None) and (y is None):
          return nonzero(condition)
      else:
          return elemwise(np.ma.where, condition, x, y)
  
imports: from __future__ import annotations
  from functools import wraps
  import numpy
  from dask.array import chunk
  from dask.array.core import asanyarray, blockwise, elemwise, map_blocks
  from dask.array.reductions import reduction
  from dask.array.routines import _average
  from dask.array.routines import nonzero
  from dask.base import normalize_token
  from dask.utils import derived_from
label_desc: Use image node_id 24 for calling a global function with example usage: where(condition, x, y) and returns: nonzero, elemwise