from typing import Any
from typing import Counter


def calc_proportion_identical(lst: Any) -> float:
    """
    Returns a value between 0 and 1 for the uniformity of the values
    in LST, i.e. higher if they're all the same.
    """

    def count_most_common(lst):
        """
        Find the most common item in LST, and count how many times it occurs.
        """
        # Counter(['a', 'b', 'a']).most_common(2) -> [
        #   ('a', 2),
        #   ('b', 1),
        # ]
        # so this gives the count of the most common (in this case 2 occurrences of 'a')
        return Counter(lst).most_common(1)[0][1]

    most_common = count_most_common(lst)
    if most_common == 1:
        return 0
    else:
        return most_common / len(lst)