input: Write a function to calculate the percentage of transcripts mapping to rRNA and MT genes from an HTseq_counts file and a GTF file. The function should check if the input files exist, extract all identifiers of genes/transcripts mapping to rRNA and MT, count the reads matching these identifiers, and write the output to a summary file named "<HTseq_counts_file>_rRNAmtRNACounts.txt". The function should return True if the operation is successful, otherwise False.
  
  assert calculate_rRNA_percentage("test_htseq_counts.txt", "test_gtf.gtf") == True
  assert calculate_rRNA_percentage("nonexistent_file.txt", "test_gtf.gtf") == False
  assert calculate_rRNA_percentage("test_htseq_counts.txt", "nonexistent_file.gtf") == False
  assert calculate_rRNA_percentage("empty_htseq_counts.txt", "empty_gtf.gtf") == True
output: def calculate_rRNA_percentage(htseq_counts_file, gtf_file):
      import os
      if not os.path.exists(htseq_counts_file) or not os.path.exists(gtf_file):
          return False
      
      rRNA_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]
                  if 'gene_biotype "rRNA"' in gene_info or 'gene_biotype "Mt_rRNA"' in gene_info:
                      gene_id = gene_info.split('gene_id "')[1].split('"')[0]
                      rRNA_mt_ids.add(gene_id)
      
      total_reads = 0
      rRNA_mt_reads = 0
      with open(htseq_counts_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_mt_ids:
                  rRNA_mt_reads += count
      
      if total_reads == 0:
          rRNA_mt_percentage = 0
      else:
          rRNA_mt_percentage = (rRNA_mt_reads / total_reads) * 100
      
      output_file = f"{htseq_counts_file}_rRNAmtRNACounts.txt"
      with open(output_file, 'w') as out:
          out.write(f"rRNA and MT reads percentage: {rRNA_mt_percentage:.2f}%\n")
      
      return True