code: def assert_eq(
      a,
      b,
      check_shape=True,
      check_graph=True,
      check_meta=True,
      check_chunks=True,
      check_ndim=True,
      check_type=True,
      check_dtype=True,
      equal_nan=True,
      scheduler="sync",
      **kwargs,
  ):
      a_original = a
      b_original = b
  
      if isinstance(a, (list, int, float)):
          a = np.array(a)
      if isinstance(b, (list, int, float)):
          b = np.array(b)
  
      a, adt, a_meta, a_computed = _get_dt_meta_computed(
          a,
          check_shape=check_shape,
          check_graph=check_graph,
          check_chunks=check_chunks,
          check_ndim=check_ndim,
          scheduler=scheduler,
      )
      b, bdt, b_meta, b_computed = _get_dt_meta_computed(
          b,
          check_shape=check_shape,
          check_graph=check_graph,
          check_chunks=check_chunks,
          check_ndim=check_ndim,
          scheduler=scheduler,
      )
  
      if check_dtype and str(adt) != str(bdt):
          raise AssertionError(
              f"a and b have different dtypes: (a: {adt}, b: {bdt})"
          )
  
      try:
          assert (
              a.shape == b.shape
          ), f"a and b have different shapes (a: {a.shape}, b: {b.shape})"
          if check_type:
              _a = a if a.shape else a.item()
              _b = b if b.shape else b.item()
              assert type(_a) == type(
                  _b
              ), f"a and b have different types (a: {type(_a)}, b: {type(_b)})"
          if check_meta:
              if hasattr(a, "_meta") and hasattr(b, "_meta"):
                  assert_eq(a._meta, b._meta)
              if hasattr(a_original, "_meta"):
                  msg = (
                      f"compute()-ing 'a' changes its number of dimensions "
                      f"(before: {a_original._meta.ndim}, after: {a.ndim})"
                  )
                  assert a_original._meta.ndim == a.ndim, msg
                  if a_meta is not None:
                      msg = (
                          f"compute()-ing 'a' changes its type "
                          f"(before: {type(a_original._meta)}, after: {type(a_meta)})"
                      )
                      assert type(a_original._meta) == type(a_meta), msg
                      if not (
                          np.isscalar(a_meta) or np.isscalar(a_computed)
                      ):
                          msg = (
                              f"compute()-ing 'a' results in a different type than implied by its metadata "
                              f"(meta: {type(a_meta)}, computed: {type(a_computed)})"
                          )
                          assert type(a_meta) == type(a_computed), msg
              if hasattr(b_original, "_meta"):
                  msg = (
                      f"compute()-ing 'b' changes its number of dimensions "
                      f"(before: {b_original._meta.ndim}, after: {b.ndim})"
                  )
                  assert b_original._meta.ndim == b.ndim, msg
                  if b_meta is not None:
                      msg = (
                          f"compute()-ing 'b' changes its type "
                          f"(before: {type(b_original._meta)}, after: {type(b_meta)})"
                      )
                      assert type(b_original._meta) == type(b_meta), msg
                      if not (
                          np.isscalar(b_meta) or np.isscalar(b_computed)
                      ):
                          msg = (
                              f"compute()-ing 'b' results in a different type than implied by its metadata "
                              f"(meta: {type(b_meta)}, computed: {type(b_computed)})"
                          )
                          assert type(b_meta) == type(b_computed), msg
          msg = "found values in 'a' and 'b' which differ by more than the allowed amount"
          assert allclose(a, b, equal_nan=equal_nan, **kwargs), msg
          return True
      except TypeError:
          pass
  
      c = a == b
  
      if isinstance(c, np.ndarray):
          assert c.all()
      else:
          assert c
  
      return True
  
imports: from __future__ import annotations
  import contextlib
  import functools
  import itertools
  import math
  import numbers
  import warnings
  import numpy
  from tlz import concat, frequencies
  from dask.array.core import Array
  from dask.array.numpy_compat import AxisError
  from dask.base import is_dask_collection, tokenize
  from dask.highlevelgraph import HighLevelGraph
  from dask.utils import has_keyword, is_arraylike, is_cupy_type, typename
label_desc: Use image node_id 11 for calling a global function with example usage: assert_eq(a, b, check_shape, check_graph, check_meta, check_chunks, check_ndim, check_type, check_dtype, equal_nan, scheduler) and returns: True, True