def check_detection_overlap(gs, dd):
    """
    Evaluates if two detections overlap

    Paramters
    ---------
    gs: list
        Gold standard detection [start,stop]
    dd: list
        Detector detection [start,stop]

    Returns
    -------
    overlap: bool
        Whether two events overlap.

    """

    overlap = False

    # dd stop in gs + (dd inside gs)
    if (dd[1] >= gs[0]) and (dd[1] <= gs[1]):
        overlap = True
    # dd start in gs + (dd inside gs)
    if (dd[0] >= gs[0]) and (dd[0] <= gs[1]):
        overlap = True
    # gs inside dd
    if (dd[0] <= gs[0]) and (dd[1] >= gs[1]):
        overlap = True

    return overlap