input: 
  from typing import List
  
  def calculate_percent_rrna(htseq_counts_path: str, gtf_path: str) -> str:
      """
      Calculate the percent of transcripts mapping to rRNA for given HTseq counts file and GTF file.
      Return the summary output file name.
      
      >>> calculate_percent_rrna('path/to/C17_3_S20_Aligned.out.srt.bam_htseq_combined_counts.txt', 'path/to/Mus_musculus.GRCm38.84.gtf')
      'C17_3_S20_Aligned.out.srt.bam_htseq_combined_counts_rRNAmtRNACounts.txt'
      """
  
output:     import os
      from collections import defaultdict
  
      def read_gtf(gtf_path):
          rrna_genes = set()
          with open(gtf_path, 'r') as gtf_file:
              for line in gtf_file:
                  if line.startswith('#'):
                      continue
                  fields = line.strip().split('\t')
                  if fields[2] == 'gene':
                      gene_info = fields[8]
                      if 'gene_biotype "rRNA"' in gene_info:
                          gene_id = gene_info.split('gene_id "')[1].split('";')[0]
                          rrna_genes.add(gene_id)
          return rrna_genes
  
      def read_htseq_counts(htseq_counts_path, rrna_genes):
          rrna_counts = 0
          total_counts = 0
          with open(htseq_counts_path, 'r') as htseq_file:
              for line in htseq_file:
                  if line.startswith('__'):
                      continue
                  gene_id, count = line.strip().split('\t')
                  count = int(count)
                  total_counts += count
                  if gene_id in rrna_genes:
                      rrna_counts += count
          return rrna_counts, total_counts
  
      rrna_genes = read_gtf(gtf_path)
      rrna_counts, total_counts = read_htseq_counts(htseq_counts_path, rrna_genes)
  
      percent_rrna = (rrna_counts / total_counts) * 100
  
      output_file_name = os.path.basename(htseq_counts_path).replace('.txt', '_rRNAmtRNACounts.txt')
      with open(output_file_name, 'w') as output_file:
          output_file.write(f"Total counts: {total_counts}\n")
          output_file.write(f"rRNA counts: {rrna_counts}\n")
          output_file.write(f"Percent rRNA: {percent_rrna:.2f}%\n")
  
      return output_file_name