code: def _array_equal(x, y, npi, rtol, atol):
      assert x.dtype == y.dtype
      if (
          isinstance(rtol, (int, float))
          and isinstance(atol, (int, float))
          and rtol == 0
          and atol == 0
      ) or not npi.issubdtype(x.dtype, npi.inexact):
          return npi.all(x == y)
      else:
          return npi.allclose(x, y, rtol=rtol, atol=atol)
  
imports: from collections.abc import Callable, Sequence
  from typing import Any, Optional, TYPE_CHECKING, Union
  import jax.numpy
  import jax.tree_util
  import numpy
  from jaxtyping import Array, ArrayLike, Bool, Float, PyTree, PyTreeDef
  from ._custom_types import sentinel
  from ._doc_utils import doc_repr
  from ._filters import is_array
label_desc: Use image node_id 3 for calling a global function with example usage: _array_equal(x, y, npi, rtol, atol) and returns: npi, npi