def print_candidates_from_nearest_neighbors(out_file_candidates_name, C, params
    ):
    """
        alignments_of_x_to_c has format
        {x_acc : {y_acc : (x_alignment, y_alignment, (matches, mismatches, indels)) } }
    """
    out_file_candidates = open(out_file_candidates_name, 'w')
    final_candidate_count = 0
    for c_acc, c_seq in sorted(C.items()):
        out_file_candidates.write('>{0}\n{1}\n'.format(c_acc, c_seq))
        final_candidate_count += 1
    print('Final candidate count: ', final_candidate_count)
    out_file_candidates.close()
