def _extension_sizes(dupl1, dupl2):
    """
    If dupl2 cannot extend dupl1 (different locations or strands), returns None.
    Otherwise, returns two numbers: extension1 and extension2, which represent the sizes of new regions covered by dupl2.

    It is assumed that dupl1.region1.intersects(dupl2.region1).
    """
    if dupl1.strand != dupl2.strand or not dupl1.region2.intersects(dupl2.region2):
        return None

    if dupl1.strand:
        if dupl1.region2.start > dupl2.region2.start:
            return None
        extension2 = dupl2.region2.end - dupl1.region2.end
    else:
        if dupl2.region2.end > dupl1.region2.end:
            return None
        extension2 = dupl1.region2.start - dupl2.region2.start

    extension1 = dupl2.region1.end - dupl1.region1.end
    return extension1, extension2