def parsimony_informative_or_constant(numOccurences):
    """
    Determines if a site is parsimony informative or constant.
    A site is parsimony-informative if it contains at least two types of nucleotides 
    (or amino acids), and at least two of them occur with a minimum frequency of two.
    https://www.megasoftware.net/web_help_7/rh_parsimony_informative_site.htm

    A site is constant if it contains only one character and that character occurs
    at least twice. https://www.megasoftware.net/web_help_7/rh_constant_site.htm

    Arguments
    ---------
    argv: numOccurences
        dictionary with sequence characters (keys) and their counts (values)
    """

    # create a dictionary of characters that occur at least twice
    d = dict((k, v) for k, v in numOccurences.items() if v >= 2)
    # if multiple characters occur at least twice, the site is parsimony
    # informative and not constant
    if len(d) >= 2:
        parsimony_informative = True
        constant_site = False
    # if one character occurs at least twice and is the only character,
    # the site is not parismony informative but it is constant
    elif len(d) == 1 and len(numOccurences) == 1:
        parsimony_informative = False
        constant_site = True
    else:
        parsimony_informative = False
        constant_site = False

    return parsimony_informative, constant_site