input: 
  def check_rRNA_MT_mapping(htseq_file: str, gtf_file: str) -> str:
      """ Calculate the percent of transcripts mapping to rRNA and MT genes from given HTseq_counts file and GTF file.
      The function returns the name of the summary output file.
      
      >>> check_rRNA_MT_mapping("C17_3_S20_Aligned.out.srt.bam_htseq_combined_counts.txt", "/Users/malwina/Documents/CTR-Data/genomes/Mus_musculus/mm10/Mus_musculus.GRCm38.84.gtf")
      'C17_3_S20_Aligned.out.srt.bam_htseq_combined_counts_rRNAmtRNACounts.txt'
      """
  
output:     import pandas as pd
      import os
  
      # Load the HTseq counts file
      htseq_df = pd.read_csv(htseq_file, sep='\t', header=None, names=['gene_id', 'count'])
  
      # Load the GTF file and extract gene information
      gtf_df = pd.read_csv(gtf_file, sep='\t', comment='#', header=None, usecols=[2, 8], names=['feature', 'attributes'])
      gtf_df['gene_id'] = gtf_df['attributes'].str.extract(r'gene_id "([^"]+)"')
      gtf_df['gene_type'] = gtf_df['attributes'].str.extract(r'gene_type "([^"]+)"')
  
      # Filter for rRNA and MT genes
      rRNA_MT_genes = gtf_df[(gtf_df['gene_type'] == 'rRNA') | (gtf_df['gene_type'] == 'Mt_rRNA') | (gtf_df['gene_type'] == 'Mt_tRNA')]['gene_id'].unique()
  
      # Filter the HTseq counts for rRNA and MT genes
      rRNA_MT_counts = htseq_df[htseq_df['gene_id'].isin(rRNA_MT_genes)]
  
      # Calculate the total counts for rRNA and MT genes
      total_rRNA_MT_counts = rRNA_MT_counts['count'].sum()
  
      # Calculate the total counts for all genes
      total_counts = htseq_df['count'].sum()
  
      # Calculate the percentage of counts mapping to rRNA and MT genes
      percent_rRNA_MT = (total_rRNA_MT_counts / total_counts) * 100
  
      # Create the summary output file name
      output_file = os.path.splitext(htseq_file)[0] + "_rRNAmtRNACounts.txt"
  
      # Write the summary to the output file
      with open(output_file, 'w') as f:
          f.write(f"Total counts mapping to rRNA and MT genes: {total_rRNA_MT_counts}\n")
          f.write(f"Total counts: {total_counts}\n")
          f.write(f"Percentage of counts mapping to rRNA and MT genes: {percent_rRNA_MT:.2f}%\n")
  
      return output_file