def METHOD_NAME(addr, mapping) -> Tuple[int, Optional[ObjectAndBase]]:
    idx = bisect.bisect_left(mapping, addr)
    obj = None
    if 0 <= idx < len(mapping):
        # check if addr == object.base
        obj = mapping[idx]
        if addr == obj.base_addr:
            # found
            pass
        elif idx > 0:
            idx = idx - 1
            obj = mapping[idx]
        else:  # idx == len(mapping)
            idx = idx - 1
            obj = mapping[idx]
    return idx, obj