from typing import Set


def set_overlap(a: Set, b: Set) -> float:
    """
    Compute overlap percentage of two sets (normalized by average length of sets)
    :param a:
    :param b:
    :return:
    """
    if (not a) or (not b):
        return 0.0
    else:
        return 2. * len(a.intersection(b)) / (len(a) + len(b))