import re


def get_boundingbox(s) -> dict:
    """
    Using the input string (for bbox), parse out the x1, y1, x2, y2 coordinates (i.e. BoundingBox)
    and return a dictionary containing the left/top/right/bottom values.

    The response dictionary defaults the left/top/right/bottom to 0.
    """
    bb_rgx = r'''(?<=bbox )([0-9]{0,4}) ([0-9]{0,4}) ([0-9]{0,4}) ([0-9]{0,4})'''
    bb = {
        "left":0,
        "top":0,
        "right":0,
        "bottom":0
    }

    match = re.search(bb_rgx, s.get('title'))

    if match:
        bb["left"] = int(match.group(1))
        bb["top"] = int(match.group(2))
        bb["right"] = int(match.group(3))
        bb["bottom"] = int(match.group(4))

    return bb