def _hits_overlap(a, b, threshold=0.2):
    """Return True if Domain overlap is greater than threshold * domain size.

    The specified domains typically should share no overlap, tending to be discrete with
    inter-domain gaps. Subsequently, the default threshold is set low. However, it is
    not 0, as to accomodate SOME level of overlap.

    Parameters
    ----------
    a : Domain
        First Domain object.
    b : Domain
        Second Domain object.
    threshold : int
        Minimum percentage to classify two Domains as overlapping. By default,
        `threshold` is set to 0.9, i.e. two Domains are considered as overlapping if
        the total amount of overlap is greater than 90% of either Domain hit.

    Returns
    -------
    bool
        True if Domain overlap exceeds threshold, False if not.
    """
    start, end = max(a.start, b.start), min(a.end, b.end)
    overlap = max(0, end - start)
    a_threshold = threshold * (a.end - a.start)
    b_threshold = threshold * (b.end - b.start)
    return overlap >= a_threshold or overlap >= b_threshold
