class_docstr: Extracts the class of the variant (possible values are keys in
  
  `classes_dict`) from INFO/`info_field_name` field in VCF file.
docstr: Gets label information for each variant in variants.
  
  This is the primary API for assigning labels to variants. This function
  takes and iterable of variants and yield a VariantLabel object for each
  variant. The VariantLabel can be used to determine the variant type label
  for each variant suitable for training a DeepVariant model. The API accepts
  an iterable of Variants because, in the general case, the labeling of
  variants aren't independent, in that the label assigned to one variant may
  impact the label we assign to a nearby variant.
  
  Args:
    variants: iterable[nucleus.protos.Variant]: An iterable of variants to
      label. The variants should be in coordinate-sorted order and all on the
      same chromosome.
    region: A nucleus.genomics.v1.Range object specifying the region over
      which we are labeling variants. This should span at least the span of
      variants, but may be larger. Statistics about the labeling will be
      computed over region.
  
  Yields:
    A VariantLabel object for each variant in variants, in order.
code: def label_variants(self, variants, region=None):
      """Gets label information for each variant in variants.
  
      This is the primary API for assigning labels to variants. This function
      takes and iterable of variants and yield a VariantLabel object for each
      variant. The VariantLabel can be used to determine the variant type label
      for each variant suitable for training a DeepVariant model. The API accepts
      an iterable of Variants because, in the general case, the labeling of
      variants aren't independent, in that the label assigned to one variant may
      impact the label we assign to a nearby variant.
  
      Args:
        variants: iterable[nucleus.protos.Variant]: An iterable of variants to
          label. The variants should be in coordinate-sorted order and all on the
          same chromosome.
        region: A nucleus.genomics.v1.Range object specifying the region over
          which we are labeling variants. This should span at least the span of
          variants, but may be larger. Statistics about the labeling will be
          computed over region.
  
      Yields:
        A VariantLabel object for each variant in variants, in order.
      """
      for variant in variants:
          is_confident, truth_variant = self._match(variant)
  
          yield CustomizedClassesVariantLabel(
              is_confident=is_confident,
              variant=variant,
              truth_variant=truth_variant,
              classes_list=self.classes_list,
              info_field_name=self.info_field_name,
          )
  
file_path: deepvariant/deepvariant/labeler/customized_classes_labeler.py
imports: from deepvariant.labeler import positional_labeler
  from deepvariant.labeler import variant_labeler
  from third_party.nucleus.util import struct_utils
label_desc: Use image node_id 2 for calling the CustomizedClassesVariantLabeler obj's underlying member method code with example usage: obj.label_variants(variants, region) without return types