code: def _assert_input_dict_equals(
      d1: Dict[str, np.ndarray], d2: Dict[str, np.ndarray]
  ):
      for key in d1.keys():
          assert key in d2.keys()
  
      for key in d2.keys():
          assert key in d1.keys()
  
      for key in d1.keys():
          assert isinstance(
              d1[key], np.ndarray
          ), "input_dict should only be numpy array."
          assert isinstance(
              d2[key], np.ndarray
          ), "input_dict should only be numpy array."
          assert (
              d1[key].shape == d2[key].shape
          ), "input_dict are of different shape."
          assert np.allclose(
              d1[key], d2[key]
          ), "input_dict values are not equal."
  
file_path: ray/rllib_contrib/dt/tests/test_dt_policy.py
imports: import unittest
  from typing import Dict
  import gymnasium
  import numpy
  from rllib_dt.dt.dt_torch_policy import DTTorchPolicy
  import ray
  from ray.rllib.policy.sample_batch import SampleBatch
  from ray.rllib.utils.framework import try_import_tf, try_import_torch
label_desc: Use image node_id 2 for calling a global function with example usage: _assert_input_dict_equals(d1, d2) without return types