def hist_dict(array):
    """
    Return a histogram of any items as a dict.

    The keys of the returned dict are elements of 'array' and the values
    are the counts of each element in 'array'.
    """

    hist = {}
    for i in array:
        if i in hist:
            hist[i] += 1
        else:
            hist[i] = 1
    return hist