code: def cds_data_almost_equal(
      data1: Data, data2: Data, rtol: float = 1e-09, atol: float = 0.0
  ) -> bool:
      """Compares data dictionaries containing floats, lists and arrays
      Also supports nested lists and arrays
      """
      if sorted(data1.keys()) != sorted(data2.keys()):
          return False
      for c in data1.keys():
          cd1 = data1[c]
          cd2 = data2[c]
          if len(cd1) != len(cd2):
              return False
          for v1, v2 in zip(cd1, cd2):
              if isinstance(v1, (float, int)) and isinstance(
                  v2, (float, int)
              ):
                  if not np.isclose(v1, v2, rtol, atol):
                      return False
              elif isinstance(v1, (list, np.ndarray)) and isinstance(
                  v2, (list, np.ndarray)
              ):
                  v1, v2 = np.asarray(v1), np.asarray(v2)
                  if (
                      v1.dtype.kind in "iufcmM"
                      and v2.dtype.kind in "iufcmM"
                  ):
                      if (~np.isclose(v1, v2, rtol, atol)).any():
                          return False
                  elif (v1 != v2).any():
                      return False
              elif v1 != v2:
                  return False
      return True
  
imports: from __future__ import annotations
  import logging
  from typing import TYPE_CHECKING, Any, Sequence, Union
  import numpy
  import numpy.typing
label_desc: Use image node_id 1 for calling a global function with example usage: cds_data_almost_equal(data1, data2, rtol, atol) and returns: True, False, False, False, False, False, False