code: def make_population_vcf_readers(
      population_vcf_filenames: Sequence[str],
  ) -> DefaultDict[str, Optional[vcf.VcfReader]]:
      """Creates VcfReaders for the given VCF file paths, organized by reference.
  
      VcfReaders can be made either from a single VCF that covers all the relevant
      reference sequences or strictly one VCF per reference sequence. By returning
      a defaultdict, any code using the output of this function does not have to
      consider whether there are multiple VCFs or not, it can simply query by
      chromosome and get a reader.
  
      Args:
        population_vcf_filenames: Paths to files (VCF or VCF.gz) with population
          genotypes.
  
      Raises:
        ValueError: If there is more than one VCF file containing variants
          from the same chromosome.
  
      Returns:
        A defaultdict that maps from a reference name to an associated VcfReader.
        If there was only one VCF provided, all references will map to that one
        reader. If more than one VCF was provided, the references will have a
        reader each, while any that were not included will map to None.
      """
      # If only one VCF file is provided.
      if len(population_vcf_filenames) == 1:
          # The DefaultDict allows later code to query for any chromosome and still
          # get the same reader. This is great for compatibility with multi-VCF below.
          return collections.defaultdict(
              lambda: vcf.VcfReader(population_vcf_filenames[0])
          )
  
      # If more than one VCF files are provided.
      population_vcf_readers = DefaultDict(lambda: None)
  
      for vcf_filename in population_vcf_filenames:
          population_vcf_reader = vcf.VcfReader(
              vcf_filename, header=None
          )
  
          # Get contig name from the first variant in a file.
          for var in population_vcf_reader:
              reference_name = var.reference_name
              break
          # There should not be more than one VCFs including variants in
          # reference_name.
          if population_vcf_readers.get(reference_name):
              raise ValueError(
                  "Variants on %s are included in multiple VCFs"
                  % reference_name
              )
          population_vcf_readers[reference_name] = population_vcf_reader
  
      return population_vcf_readers
  
file_path: deepvariant/deepvariant/allele_frequency.py
imports: import collections
  from typing import DefaultDict, Sequence, Optional
  from absl import logging
  from third_party.nucleus.io import vcf
  from third_party.nucleus.util import ranges
  from third_party.nucleus.util import variant_utils
  from deepvariant.protos import deepvariant_pb2
label_desc: Use image node_id 7 for calling a global function with example usage: make_population_vcf_readers(population_vcf_filenames) and returns: population_vcf_readers, collections