<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _trim_adapters(fastq_files, out_dir, data):
 """ for small insert sizes, the read length can be longer than the insert resulting in the reverse complement of the 3' adapter being sequenced. this takes adapter sequences and trims the only the reverse complement of the adapter MYSEQUENCEAAAARETPADA -> MYSEQUENCEAAAA (no polyA trim) """

    to_trim = _get_sequences_to_trim(data["config"], SUPPORTED_ADAPTERS)
    if dd.get_trim_reads(data) == "fastp":
        out_files, report_file = _fastp_trim(fastq_files, to_trim, out_dir, data)
    else:
        out_files, report_file = _atropos_trim(fastq_files, to_trim, out_dir, data)
    # quality_format = _get_quality_format(data["config"])
    # out_files = replace_directory(append_stem(fastq_files, "_%s.trimmed" % name), out_dir)
    # log_file = "%s_log_cutadapt.txt" % splitext_plus(out_files[0])[0]
    # out_files = _cutadapt_trim(fastq_files, quality_format, to_trim, out_files, log_file, data)
    # if file_exists(log_file):
    #     content = open(log_file).read().replace(fastq_files[0], name)
    #     if len(fastq_files) > 1:
    #         content = content.replace(fastq_files[1], name)
    #     open(log_file, 'w').write(content)
    return out_files