input: def calculate_rRNA_MT_percent(htseq_file_path: str, gtf_file_path: str) -> str:
      """ Calculate the percentage of transcripts mapping to rRNA and MT genes from the given HTseq_counts file and GTF file.
      The script will extract all the identifiers of genes/transcripts mapping to the rRNA and MT genes, count the reads matching these identifiers,
      and write the output to a summary file named "HTseq_counts_file_rRNAmtRNACounts.txt".
      >>> calculate_rRNA_MT_percent('/path/to/HTseq_counts/file', '/path/to/GTF/file')
      'Summary output file: /path/to/HTseq_counts/file_rRNAmtRNACounts.txt\n'
      """
output:     import re
      import os
  
      def extract_gene_info(gtf_file_path):
          rRNA_MT_genes = set()
          with open(gtf_file_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]
                      gene_id_match = re.search(r'gene_id "([^"]+)"', gene_info)
                      gene_type_match = re.search(r'gene_type "([^"]+)"', gene_info)
                      if gene_id_match and gene_type_match:
                          gene_id = gene_id_match.group(1)
                          gene_type = gene_type_match.group(1)
                          if gene_type in ['rRNA', 'Mt_rRNA', 'Mt_tRNA']:
                              rRNA_MT_genes.add(gene_id)
          return rRNA_MT_genes
  
      def count_reads(htseq_file_path, rRNA_MT_genes):
          total_reads = 0
          rRNA_MT_reads = 0
          with open(htseq_file_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_reads += count
                  if gene_id in rRNA_MT_genes:
                      rRNA_MT_reads += count
          return total_reads, rRNA_MT_reads
  
      rRNA_MT_genes = extract_gene_info(gtf_file_path)
      total_reads, rRNA_MT_reads = count_reads(htseq_file_path, rRNA_MT_genes)
  
      summary_file_path = f"{htseq_file_path}_rRNAmtRNACounts.txt"
      with open(summary_file_path, 'w') as summary_file:
          summary_file.write(f"Total reads: {total_reads}\n")
          summary_file.write(f"rRNA and MT reads: {rRNA_MT_reads}\n")
          summary_file.write(f"Percentage of rRNA and MT reads: {100 * rRNA_MT_reads / total_reads:.2f}%\n")
  
      return f'Summary output file: {summary_file_path}\n'