import random


def four_point_crossover(first_parent, second_parent):
    """
    Makes 2 child units using 4 point crossover method
    :param first_parent: parent to be crossed over
    :param second_parent: parent to be crossed over
    :return: 2 child units
    """
    points = sorted(random.sample(range(0, len(first_parent[0])), 4))
    first_parent = first_parent[0]
    second_parent = second_parent[0]
    first_child = first_parent[:points[0]] + second_parent[points[0]:points[1]] + \
                  first_parent[points[1]:points[2]] + \
                  second_parent[points[2]:points[3]] + first_parent[points[3]:]
    second_child = second_parent[:points[0]] + first_parent[points[0]:points[1]] + \
                   second_parent[points[1]:points[2]] + \
                   first_parent[points[2]:points[3]] + second_parent[points[3]:]

    return [(first_child, -100), (second_child, -100)]