code: def test_ufunc_where(dtype, left_is_da, right_is_da, where_kind):
      left = np.arange(12).reshape((3, 4))
      right = np.arange(4)
      out = np.zeros_like(left, dtype=dtype)
      d_out = da.zeros_like(left, dtype=dtype)
  
      if where_kind in (True, False):
          d_where = where = where_kind
      else:
          d_where = where = np.array([False, True, True, False])
          if where_kind == "dask":
              d_where = da.from_array(where, chunks=2)
  
      d_left = da.from_array(left, chunks=2) if left_is_da else left
      d_right = da.from_array(right, chunks=2) if right_is_da else right
  
      expected = np.add(left, right, where=where, out=out, dtype=dtype)
      result = da.add(
          d_left, d_right, where=d_where, out=d_out, dtype=dtype
      )
      assert result is d_out
      assert_eq(expected, result)
  
imports: from __future__ import annotations
  import pickle
  import warnings
  from functools import partial
  from operator import add
  import pytest
  import dask.array
  from dask.array.ufunc import da_frompyfunc
  from dask.array.utils import assert_eq
  from dask.base import tokenize
label_desc: Use image node_id 22 for calling a global function with example usage: test_ufunc_where(dtype, left_is_da, right_is_da, where_kind) without return types