code: def test_add_allele_frequencies_to_candidates(
      self, dv_calls, expected_return, testcase
  ):
      if testcase == "valid":
          pop_vcf_reader = vcf.VcfReader(
              testdata.VCF_WITH_ALLELE_FREQUENCIES
          )
          ref_reader = fasta.IndexedFastaReader(testdata.GRCH38_FASTA)
      elif testcase == "no VCF":
          pop_vcf_reader = None
          ref_reader = None
      else:
          raise ValueError("Invalid testcase for parameterized test.")
      updated_dv_call = list(
          allele_frequency.add_allele_frequencies_to_candidates(
              dv_calls, pop_vcf_reader, ref_reader
          )
      )
      actual_frequency = updated_dv_call[0].allele_frequency
      # Compare keys.
      self.assertSetEqual(
          set(actual_frequency.keys()), set(expected_return.keys())
      )
      # Compare values (almost equal).
      for key in actual_frequency.keys():
          self.assertAlmostEqual(
              actual_frequency[key], expected_return[key]
          )
  
file_path: deepvariant/deepvariant/allele_frequency_test.py
imports: from absl.testing import absltest
  from absl.testing import parameterized
  from third_party.nucleus.io import fasta
  from third_party.nucleus.io import vcf
  from third_party.nucleus.protos import variants_pb2
  from deepvariant import allele_frequency
  from deepvariant import testdata
  from deepvariant.protos import deepvariant_pb2
label_desc: Use image node_id 7 for calling the AlleleFrequencyTest obj's underlying member method code with example usage: obj.test_add_allele_frequencies_to_candidates(dv_calls, expected_return, testcase) without return types