def get_max_sense(instance_dict, instances=None):
    """
    Return a list of senses with maximum graded sense score.

    >>> d = {1: [('s1', 9), ('s2', 8.9), ('s6', 12)], 2: [('s2', 1), ('s3', 7)]}
    >>> get_max_sense(d)
    ['s6', 's3']
    >>> get_max_sense(d, [1])
    ['s6']
    """

    if instances is not None:
        senses = []
        for i in instances:
            senses.append(max(instance_dict[i], key=lambda x: x[1])[0])
    else:
        senses = [max(e, key=lambda x: x[1])[0] for e in instance_dict.values()]

    return senses