from functools import reduce


def dimension_list_size(item_list):
    """Compute the total size of an dimension list.

    Parameters
    ----------
    item_list : ItemList
        The Dimension List to compute the size of.

    Returns
    -------
    Integer
        Size of the passed Dimension List

    """
    if item_list.count == 0:
        return 1
    elif item_list.count == 1:
        return item_list[0].size
    else:
        return reduce(lambda x, y: x * y, [i.size for i in item_list])