docs: def number_of_bases_above_threshold(high_quality_base_count, base_count_cutoff=2, base_fraction_cutoff=None):
      """
      Finds if a site has at least two bases of  high quality, enough that it can be considered
      fairly safe to say that base is actually there.
      :param high_quality_base_count: Dictionary of count of HQ bases at a position where key is base and values is the count of that base.
      :param base_count_cutoff: Number of bases needed to support multiple allele presence.
      :param base_fraction_cutoff: Fraction of bases needed to support multiple allele presence.
      :return: True if site has at least base_count_cutoff/base_fraction_cutoff bases, False otherwise (changeable by user)
      """
  
      # make a dict by dictionary comprehension where values are True or False for each base depending on whether the count meets the threshold.
      # Method differs depending on whether absolute or fraction cutoff is specified
      if base_fraction_cutoff:
          total_hq_base_count = sum(high_quality_base_count.values())
          bases_above_threshold = {base: float(count)/total_hq_base_count >= base_fraction_cutoff and count >= base_count_cutoff for (base,count) in high_quality_base_count.items()}
      else:
          bases_above_threshold = {base: count >= base_count_cutoff for (base, count) in high_quality_base_count.items()}
  
      # True is equal to 1 so sum of the number of Trues in the bases_above_threshold dict is the number of bases passing threhold
      return sum(bases_above_threshold.values())