input: Write a function to calculate the percentage of transcripts mapping to rRNA and MT genes from a given HTseq_counts file and a GTF file. The function should output a summary file named after the HTseq_counts file with "_rRNAmtRNACounts.txt" appended. The function should return `True` if the operation is successful and `False` otherwise.
  
  
  def calculate_rRNA_MT_percentage(htseq_file, gtf_file):
      # Implementation here
      return True or False
  
  assert calculate_rRNA_MT_percentage('C17_3_S20_Aligned.out.srt.bam_htseq_combined_counts.txt', '/path/to/GTF/file')==True
  assert calculate_rRNA_MT_percentage('nonexistent_file.txt', '/path/to/GTF/file')==False
  assert calculate_rRNA_MT_percentage('C17_3_S20_Aligned.out.srt.bam_htseq_combined_counts.txt', 'nonexistent_gtf.gtf')==False
  assert calculate_rRNA_MT_percentage('empty.txt', '/path/to/GTF/file')==True
  
output: 
  def calculate_rRNA_MT_percentage(htseq_file, gtf_file):
      try:
          with open(gtf_file, 'r') as gtf:
              rRNA_MT_genes = set()
              for line in gtf:
                  if line.startswith('#'):
                      continue
                  fields = line.strip().split('\t')
                  if fields[2] == 'gene':
                      gene_info = fields[8].split(';')
                      gene_type = [x.strip().split()[1].strip('"') for x in gene_info if 'gene_biotype' in x]
                      if gene_type and (gene_type[0] == 'rRNA' or gene_type[0] == 'Mt_rRNA' or gene_type[0] == 'Mt_tRNA'):
                          gene_id = [x.strip().split()[1].strip('"') for x in gene_info if 'gene_id' in x][0]
                          rRNA_MT_genes.add(gene_id)
          
          total_counts = 0
          rRNA_MT_counts = 0
          
          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_counts += count
                  if gene_id in rRNA_MT_genes:
                      rRNA_MT_counts += count
          
          if total_counts == 0:
              percentage = 0
          else:
              percentage = (rRNA_MT_counts / total_counts) * 100
          
          output_file = htseq_file + "_rRNAmtRNACounts.txt"
          with open(output_file, 'w') as out:
              out.write(f"Total counts: {total_counts}\n")
              out.write(f"rRNA and MT gene counts: {rRNA_MT_counts}\n")
              out.write(f"Percentage of rRNA and MT genes: {percentage:.2f}%\n")
          
          return True
      except Exception as e:
          return False
  