code: def test_label_variants(
      self,
      candidate,
      expected_confident,
      expected_truth,
      expected_label=None,
      variant_alt_alleles_indices=None,
  ):
      if variant_alt_alleles_indices is None:
          variant_alt_alleles_indices = [0]
      labeler = self._make_labeler(
          self.variants,
          ranges.RangeSet(
              [
                  ranges.make_range(
                      self.snp_class1.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.
      classes_dict = (
          customized_classes_labeler.CustomizedClassesVariantLabel.classes_dict
      )
      if expected_label is None and expected_truth is not None:
          expected_class_str = (
              expected_truth.info[
                  customized_classes_labeler.CustomizedClassesVariantLabel.info_field_name
              ]
              .values[0]
              .string_value
          )
          expected_label = classes_dict[expected_class_str]
  
      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_label,
          labels[0].label_for_alt_alleles(variant_alt_alleles_indices),
      )
  
file_path: deepvariant/deepvariant/labeler/customized_classes_labeler_test.py
imports: import collections
  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 third_party.nucleus.util import variant_utils
  from deepvariant import testdata
  from deepvariant.labeler import customized_classes_labeler
  from third_party.nucleus.protos import variants_pb2
  from third_party.nucleus.util import vcf_constants
label_desc: Use image node_id 2 for calling the CustomizedClassesVariantLabelerTest obj's underlying member method code with example usage: obj.test_label_variants(candidate, expected_confident, expected_truth, expected_label, variant_alt_alleles_indices) without return types