class_docstr: A baseclass for testing transforms.
class_docstr_tok: ["A","baseclass","for","testing","transforms","."]
docstr: Assert whether two feature dicts are equal.
docstr_tok: ["Assert","whether","two","feature","dicts","are","equal","."]
code: def _assert_features_equal(self, f1, f2, msg=""):
      """Assert whether two feature dicts are equal."""
      self.assertSequenceEqual(list(f1.keys()), list(f2.keys()))
      for k, v in f1.items():
          if isinstance(v, tf.Tensor):
              self._assert_tensors_equal(v, f2[k], msg=f"{msg}[{k}]")
          elif isinstance(v, dict):
              self._assert_features_equal(v, f2[k], msg=f"{msg}[{k}]")
          else:
              # some other object type ... leave it to tensorflow and cross fingers
              self.assertEqual(v, f2[k], msg=f"{msg}[{k}]")
  
imports: import copy
  from absl.testing import absltest
  from absl.testing import parameterized
  import numpy
  from scenic.projects.baselines.detr import transforms
  import tensorflow
label_desc: Use image node_id 2 for calling the TransformsTestBase obj's underlying member method code with example usage: obj._assert_features_equal(f1, f2, msg) without return types