code: def assertCandidatesFromReadsEquals(
      self, reads, expected, start=None, end=None, ref=None
  ):
      chrom = reads[0].alignment.position.reference_name
      start = 0 if start is None else start
      end = 20 if end is None else end
      region = ranges.make_range(chrom, start, end)
  
      if ref is None:
          ref = "A" * (ranges.length(region) + 512)
  
      ref_reader = fasta.InMemoryFastaReader([(chrom, 0, ref)])
      if isinstance(expected, type) and issubclass(expected, Exception):
          with self.assertRaises(expected):
              window_selector._candidates_from_reads(
                  self.config, ref_reader, reads, region
              )
      else:
          actual = window_selector._candidates_from_reads(
              self.config, ref_reader, reads, region
          )
          self.assertEqual(actual, expected)
  
imports: from absl.testing import absltest
  from absl.testing import parameterized
  from third_party.nucleus.io import fasta
  from third_party.nucleus.testing import test_utils
  from third_party.nucleus.util import ranges
  from deepvariant.protos import realigner_pb2
  from deepvariant.realigner import window_selector
label_desc: Use image node_id 2 for calling the AlleleCountLinearWindowSelectorTest obj's underlying member method code with example usage: obj.assertCandidatesFromReadsEquals(reads, expected, start, end, ref) without return types