def test_split(dataset: list, index: int, value: type) -> list:
    """
    Split a dataset based on an attribute and an attribute value
    :param data: list of rows to split
    :param index: index of the attribute for splitting
    :param value: value of the attribute for splitting
    :return: two lists with each group
    """
    left = list()
    right = list()

    def _recursive_split(data):
        if len(data) > 0:
            head, *tail = data
            if head[index] < value:
                left.append(head)
            else:
                right.append(head)
            _recursive_split(tail)

    _recursive_split(dataset)

    return [left, right]