code: def test_to_cigar_unit(self, length, opstr, expected):
      # Check we can convert a tuple and list of length and opstr.
      self.assertEqual(cigar.to_cigar_unit((length, opstr)), expected)
      self.assertEqual(cigar.to_cigar_unit([length, opstr]), expected)
  
      # Check that we can convert a string version len+opstr.
      self.assertEqual(
          cigar.to_cigar_unit(str(length) + opstr), expected
      )
  
      # Check that we can pass a CigarUnit through without modification.
      self.assertEqual(cigar.to_cigar_unit(expected), expected)
  
      # Check that we can pass length as a string.
      self.assertEqual(
          cigar.to_cigar_unit((str(length), opstr)), expected
      )
  
file_path: deepvariant/third_party/nucleus/util/cigar_test.py
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
  from third_party.nucleus.protos import cigar_pb2
  from third_party.nucleus.util import cigar
label_desc: Use image node_id 3 for calling the CigarTests obj's underlying member method code with example usage: obj.test_to_cigar_unit(length, opstr, expected) without return types