class_docstr: Test the iteration functionality provided by io.SamReader.
code: def assertInfoMapEqual(self, info_map, expected_info):
      self.assertCountEqual(
          info_map.keys(),
          expected_info.keys(),
          "info has {} keys but we expected {}".format(
              info_map.keys(), expected_info.keys()
          ),
      )
      for key, expected_values in expected_info.items():
          if not isinstance(expected_values, list):
              expected_values = [expected_values]
          for actual_value, expected_value in zip(
              info_map[key].values, expected_values
          ):
              if isinstance(expected_value, float):
                  self.assertAlmostEqual(
                      actual_value.number_value, expected_value
                  )
              elif isinstance(expected_value, six.integer_types):
                  self.assertEqual(
                      actual_value.int_value, expected_value
                  )
              elif isinstance(expected_value, str):
                  self.assertEqual(
                      actual_value.string_value, expected_value
                  )
              else:
                  self.fail(
                      "Unsupported expected_value type {}".format(
                          expected_value
                      )
                  )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import itertools
  from absl.testing import absltest
  from absl.testing import parameterized
  import six
  from etils import epath
  from third_party.nucleus.io import sam
  from third_party.nucleus.io import tfrecord
  from third_party.nucleus.protos import reads_pb2
  from third_party.nucleus.protos import reference_pb2
  from third_party.nucleus.testing import test_utils
  from third_party.nucleus.util import ranges
label_desc: Use image node_id 9 for calling the SamReaderTests obj's underlying member method code with example usage: obj.assertInfoMapEqual(info_map, expected_info) without return types