from typing import List
from typing import Tuple


def index_multi_dimensional_from_index_serial(
    nums_length: List[int], index_serial: int
) -> Tuple[int]:
    """calculates multi-dimensional index from `nums_length` and `index_serial`.

    Parameters
    ----------
    nums_length : List[int]
        sizes of the possible values for index tuple.
    index_serial : int
        serial index.

    Returns
    -------
    Tuple[int]
        multi-dimensional index.
        0 <= index_multi_dimensional[i] < nums_length[i] for all i.
    """
    tmp_index_serial = index_serial
    index_multi_dimensional = []
    for local_length in reversed(nums_length):
        local_index = tmp_index_serial % local_length
        index_multi_dimensional.append(local_index)
        tmp_index_serial = tmp_index_serial // local_length

    return tuple(reversed(index_multi_dimensional))