input: 
  
  from typing import List
  
  def calculate_percent_rrna(htseq_counts: List[str], gtf_file: str) -> float:
      """
      Calculate the percentage of transcripts mapping to rRNA using the given HTseq counts file and GTF file.
      The function will extract all identifiers of genes/transcripts mapping to the rRNA and MT genes, count the reads 
      matching these identifiers, and return the percentage of rRNA mapped reads.
      
      >>> calculate_percent_rrna(['/path/to/HTseq_counts/C17_3_S20_Aligned.out.srt.bam_htseq_combined_counts.txt'], '/path/to/GTF/file/Mus_musculus.GRCm38.84.gtf')
      7.854
      >>> calculate_percent_rrna(['/path/to/HTseq_counts/example1.txt'], '/path/to/GTF/file/example.gtf')
      5.321
      """
  
output:     rrna_ids = set()
      mt_ids = set()
  
      with open(gtf_file, 'r') as gtf:
          for line in gtf:
              if line.startswith('#'):
                  continue
              fields = line.strip().split('\t')
              if fields[2] == 'gene':
                  gene_info = fields[8]
                  gene_id = gene_info.split(';')[0].split(' ')[1].strip('"')
                  if 'rRNA' in gene_info:
                      rrna_ids.add(gene_id)
                  if 'MT' in gene_info:
                      mt_ids.add(gene_id)
  
      total_reads = 0
      rrna_reads = 0
  
      for htseq_file in htseq_counts:
          with open(htseq_file, 'r') as htseq:
              for line in htseq:
                  if line.startswith('__'):
                      continue
                  gene_id, count = line.strip().split('\t')
                  count = int(count)
                  total_reads += count
                  if gene_id in rrna_ids or gene_id in mt_ids:
                      rrna_reads += count
  
      if total_reads == 0:
          return 0.0
  
      percent_rrna = (rrna_reads / total_reads) * 100
      return round(percent_rrna, 3)