<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _survivor_merge(call_vcf, truth_vcf, stats, work_dir, data):
 """Perform a merge of two callsets using SURVIVOR, """

    out_file = os.path.join(work_dir, "eval-merge.vcf")
    if not utils.file_uptodate(out_file, call_vcf):
        in_call_vcf = call_vcf.replace(".vcf.gz", ".vcf")
        if not utils.file_exists(in_call_vcf):
            with file_transaction(data, in_call_vcf) as tx_in_call_vcf:
                do.run("gunzip -c {call_vcf} > {tx_in_call_vcf}".format(**locals()))
        in_truth_vcf = truth_vcf.replace(".vcf.gz", ".vcf")
        if not utils.file_exists(in_truth_vcf):
            with file_transaction(data, in_truth_vcf) as tx_in_truth_vcf:
                do.run("gunzip -c {truth_vcf} > {tx_in_truth_vcf}".format(**locals()))
        in_list_file = os.path.join(work_dir, "eval-inputs.txt")
        with open(in_list_file, "w") as out_handle:
            out_handle.write("%s\n%s\n" % (in_call_vcf, in_truth_vcf))
        with file_transaction(data, out_file) as tx_out_file:
            cmd = ("SURVIVOR merge {in_list_file} {stats[merge_size]} 1 0 0 0 {stats[min_size]} {tx_out_file}")
            do.run(cmd.format(**locals()), "Merge SV files for validation: %s" % dd.get_sample_name(data))
    return out_file