def get_support(itemsets, itemset, probability=False):
    """
    Get the support of itemset in itemsets.

    Parameters
    ----------
    itemsets : list
        All available itemsets.
    itemset : set
        The itemset of which the support is calculated.
    probability : bool
        Return the probability of an itemset containing the itemset, otherwise
        return the absolute number of itemsets which contain itemset.

    Returns
    -------
    Either a probability or the total number of itemsets which contain the
    itemset.
    """
    containing_itemsets = 0
    total_itemsets = 0
    for itemset_tmp in itemsets:
        if itemset.issubset(itemset_tmp):
            containing_itemsets += 1
        total_itemsets += 1
    if probability:
        return float(containing_itemsets) / float(total_itemsets)
    else:
        return containing_itemsets