class_docstr: Test the iteration functionality provided by io.SamReader.
code: def test_survives_malformed_lines(self, tag_string):
      try:
          reads = self._parse_read_with_aux_tags(tag_string)
          # If we didn't detect the error, make sure we actually still parsed the
          # read itself.
          self.assertLen(reads, 1)
          self.assertEqual(reads[0].fragment_name, "read_name")
          self.assertEqual(reads[0].aligned_sequence, "CCC")
          self.assertEqual(
              reads[0].alignment.position.reference_name, "chr1"
          )
          self.assertEqual(reads[0].alignment.position.position, 0)
      except ValueError as e:
          if "Failed to parse SAM record" not in str(e):
              self.fail(
                  "Parsing failed but unexpected exception was seen: "
                  + str(e)
              )
  
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 7 for calling the SamReaderTests obj's underlying member method code with example usage: obj.test_survives_malformed_lines(tag_string) without return types