code: def allclose(a, b, equal_nan=False, **kwargs):
      a = normalize_to_array(a)
      b = normalize_to_array(b)
      if getattr(a, "dtype", None) != "O":
          if hasattr(a, "mask") or hasattr(b, "mask"):
              return np.ma.allclose(a, b, masked_equal=True, **kwargs)
          else:
              return np.allclose(a, b, equal_nan=equal_nan, **kwargs)
      if equal_nan:
          return a.shape == b.shape and all(
              np.isnan(b) if np.isnan(a) else a == b
              for (a, b) in zip(a.flat, b.flat)
          )
      return (a == b).all()
  
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 4 for calling a global function with example usage: allclose(a, b, equal_nan) and returns: unknown, unknown, np, np