code: def test_trim_read(
      self,
      window,
      cigar,
      start,
      read_length,
      expected_cigar,
      expected_position,
      expected_read_length,
      comment,
  ):
      read = test_utils.make_read(
          "A" * read_length,
          start=start,
          cigar=cigar,
          quals=[30] * read_length,
      )
      region = ranges.parse_literal(window)
      output = realigner.trim_read(read, region)
      self.assertEqual(
          expected_cigar,
          cigar_utils.format_cigar_units(output.alignment.cigar),
          msg="Wrong cigar for case: {}".format(comment),
      )
      # Start position of the alignment.
      self.assertEqual(
          output.alignment.position.position,
          expected_position,
          msg="Wrong position for case: {}".format(comment),
      )
      # Read sequence.
      self.assertLen(
          output.aligned_sequence,
          expected_read_length,
          msg="Wrong length of aligned_sequence for case: {}".format(
              comment
          ),
      )
      # Base quality scores.
      self.assertLen(
          output.aligned_quality,
          expected_read_length,
          msg="Wrong  length of aligned_quality for case: {}".format(
              comment
          ),
      )
  
imports: import csv
  import itertools
  import os
  from absl import flags
  from absl.testing import absltest
  from absl.testing import flagsaver
  from absl.testing import parameterized
  from etils import epath
  import numpy
  from deepvariant import testdata
  from deepvariant.protos import realigner_pb2
  from deepvariant.realigner import realigner
  from deepvariant.realigner import utils
  from third_party.nucleus.io import fasta
  from third_party.nucleus.io import sam
  from third_party.nucleus.protos import reads_pb2
  from third_party.nucleus.testing import test_utils
  from third_party.nucleus.util import cigar
  from third_party.nucleus.util import ranges
label_desc: Use image node_id 2 for calling the TrimTest obj's underlying member method code with example usage: obj.test_trim_read(window, cigar, start, read_length, expected_cigar, expected_position, expected_read_length, comment) without return types