docs: def apply_variant_expression_filters(
          variants,
          gene_expression_dict,
          gene_expression_threshold,
          transcript_expression_dict,
          transcript_expression_threshold):
      """
      Filter a collection of variants by gene and transcript expression thresholds
  
      Parameters
      ----------
      variants : varcode.VariantCollection
  
      gene_expression_dict : dict
  
      gene_expression_threshold : float
  
      transcript_expression_dict : dict
  
      transcript_expression_threshold : float
      """
      if gene_expression_dict:
          variants = apply_filter(
              lambda variant: any(
                  gene_expression_dict.get(gene_id, 0.0) >=
                  gene_expression_threshold
                  for gene_id in variant.gene_ids
              ),
              variants,
              result_fn=variants.clone_with_new_elements,
              filter_name="Variant gene expression (min=%0.4f)" % gene_expression_threshold)
      if transcript_expression_dict:
          variants = apply_filter(
              lambda variant: any(
                  transcript_expression_dict.get(transcript_id, 0.0) >=
                  transcript_expression_threshold
                  for transcript_id in variant.transcript_ids
              ),
              variants,
              result_fn=variants.clone_with_new_elements,
              filter_name=(
                  "Variant transcript expression (min=%0.4f)" % (
                      transcript_expression_threshold,)))
      return variants