class_docstr: Unit tests for RandomHorizontalFlip.
class_docstr_tok: ["Unit","tests","for","RandomHorizontalFlip","."]
docstr: Tests hflip function by checking actual values.
docstr_tok: ["Tests","hflip","function","by","checking","actual","values","."]
code: def test_hflip(self):
      """Tests hflip function by checking actual values."""
      features = fake_decoded_features(
          7, 5, 4
      )  # hardcoded `expected` for [5, 4]
      features["label"]["boxes"] = tf.constant(
          [[1.0, 3.0, 3.0, 4.0], [2.0, 0.0, 3.0, 3.0]], dtype=tf.float32
      )
      expected = copy.deepcopy(features)
      # the following assumes cx-cy-h-w format to construct target.
      expected["inputs"] = features["inputs"][:, ::-1, :]
      expected["label"]["boxes"] = tf.constant(
          [[1.0, 3.0, 3.0, 4.0], [1.0, 0.0, 2.0, 3.0]], dtype=tf.float32
      )
  
      features_flip = transforms.hflip(features)
  
      self._assert_features_equal(
          features_flip, expected, msg="test_hflip"
      )
  
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 RandomHorizontalFlipTest obj's underlying member method code with example usage: obj.test_hflip() without return types