def nested_list_to_nested_tuple(li):
    """
    Transform a nested list to a nested tuple

    :param li: list
    :return: tuple
    """

    t = []
    for i in li:
        if type(i) is list:
            t.append(nested_list_to_nested_tuple(i))
        else:
            t.append(i)

    return tuple(t)