from functools import reduce


def _calculate_num_of_value(dimensionAttr):
    """
    Based on dimension information, caculate how many size of the list when squeeze
     the high dimension value into single dimension array.
     
    :param dimensionAttr: The dimension attribute

    :return: An integer which specifies the size of one dimension arry

    """
    if dimensionAttr.count>1: # multi dimension channel
        return reduce((lambda x, y: x*y), dimensionAttr.value)
    else:
        return dimensionAttr.value