code: def test_setitem_errs():
      x = da.ones_like(cupy.array(()), shape=(4, 4), chunks=(2, 2))
  
      with pytest.raises(ValueError):
          x[x > 1] = x
  
      # Shape mismatch
      with pytest.raises(ValueError):
          x[[True, True, False, False], 0] = [2, 3, 4]
  
      with pytest.raises(ValueError):
          x[[True, True, True, False], 0] = [2, 3]
  
      with pytest.raises(ValueError):
          x[0, [True, True, True, False]] = [2, 3]
  
      with pytest.raises(ValueError):
          x[0, [True, True, True, False]] = [1, 2, 3, 4, 5]
  
      with pytest.raises(ValueError):
          x[da.from_array([True, True, True, False]), 0] = [
              1,
              2,
              3,
              4,
              5,
          ]
  
      with pytest.raises(ValueError):
          x[0, da.from_array([True, False, False, True])] = [
              1,
              2,
              3,
              4,
              5,
          ]
  
      with pytest.raises(ValueError):
          x[:, 0] = [2, 3, 4]
  
      with pytest.raises(ValueError):
          x[0, :] = [1, 2, 3, 4, 5]
  
      x = da.ones((4, 4), chunks=(2, 2))
  
      # Too many indices
      with pytest.raises(IndexError):
          x[:, :, :] = 2
  
      # 2-d boolean indexing a single dimension
      with pytest.raises(IndexError):
          x[[[True, True, False, False]], 0] = 5
  
      # Too many/not enough booleans
      with pytest.raises(IndexError):
          x[[True, True, False]] = 5
  
      with pytest.raises(IndexError):
          x[[False, True, True, True, False]] = 5
  
      # 2-d indexing a single dimension
      with pytest.raises(IndexError):
          x[[[1, 2, 3]], 0] = 5
  
      # Multiple 1-d boolean/integer arrays
      with pytest.raises(NotImplementedError):
          x[[1, 2], [2, 3]] = 6
  
      with pytest.raises(NotImplementedError):
          x[[True, True, False, False], [2, 3]] = 5
  
      with pytest.raises(NotImplementedError):
          x[[True, True, False, False], [False, True, False, False]] = 7
  
      # scalar boolean indexing
      with pytest.raises(NotImplementedError):
          x[True] = 5
  
      with pytest.raises(NotImplementedError):
          x[cupy.array(True)] = 5
  
      with pytest.raises(NotImplementedError):
          x[0, da.from_array(True)] = 5
  
      # Scalar arrays
      y = da.from_array(cupy.array(1))
      with pytest.raises(IndexError):
          y[:] = 2
  
      # RHS has non-brodacastable extra leading dimensions
      x = cupy.arange(12).reshape((3, 4))
      dx = da.from_array(x, chunks=(2, 2))
      with pytest.raises(ValueError):
          dx[...] = cupy.arange(24).reshape((2, 1, 3, 4))
  
      # RHS has extra leading size 1 dimensions compared to LHS
      x = cupy.arange(12).reshape((3, 4))
      dx = da.from_array(x, chunks=(2, 3))
  
imports: from __future__ import annotations
  import numpy
  import pytest
  from packaging.version import parse
  import dask
  import dask.array
  from dask.array.utils import assert_eq
  from dask.sizeof import sizeof
label_desc: Use image node_id 16 for calling a global function with example usage: test_setitem_errs() without return types