code: def test_label_variants(
      self,
      candidate,
      expected_confident,
      expected_truth,
      expected_genotype=None,
  ):
      labeler = self._make_labeler(
          self.variants,
          ranges.RangeSet(
              [ranges.make_range(self.snp.reference_name, 10, 100)]
          ),
      )
  
      # Call _match so we can compare our expected truth with the actual one.
      is_confident, truth_variant = labeler._match(candidate)
      self.assertEqual(expected_truth, truth_variant)
      self.assertEqual(is_confident, expected_confident)
  
      # Now call label_variants to exercise the higher-level API.
      if expected_genotype is None and expected_truth is not None:
          expected_genotype = tuple(expected_truth.calls[0].genotype)
      labels = list(labeler.label_variants([candidate]))
      self.assertLen(labels, 1)
      self.assertEqual(candidate, labels[0].variant)
      self.assertEqual(expected_confident, labels[0].is_confident)
      self.assertEqual(expected_genotype, labels[0].genotype)
  
file_path: deepvariant/deepvariant/labeler/positional_labeler_test.py
imports: from absl.testing import absltest
  from absl.testing import parameterized
  from third_party.nucleus.io import vcf
  from third_party.nucleus.testing import test_utils
  from third_party.nucleus.util import ranges
  from deepvariant import testdata
  from deepvariant.labeler import positional_labeler
label_desc: Use image node_id 2 for calling the PositionalVariantLabelerTest obj's underlying member method code with example usage: obj.test_label_variants(candidate, expected_confident, expected_truth, expected_genotype) without return types