determine whether or not reads map to specific region of scaffold

def check_region(read, pair, region):
    """
    determine whether or not reads map to specific region of scaffold
    """
    if region is False:
        return True
    for mapping in read, pair:
        if mapping is False:
            continue
        start, length = int(mapping[3]), len(mapping[9])
        r = [start, start + length - 1]
        if get_overlap(r, region) > 0:
            return True
    return False