def union_bounding_box(a: tuple, b: tuple) ->tuple:
    """
    Get the bounding box resulting of the union of two bounding boxes.

    :param a: Tuple defining a bounding box using the format (x, y, width, height)
    :param b: Tuple defining a bounding box using the format (x, y, width, height)
    :return:
    """
    x = min(a[0], b[0])
    y = min(a[1], b[1])
    w = max(a[0] + a[2], b[0] + b[2]) - x
    h = max(a[1] + a[3], b[1] + b[3]) - y
    return x, y, w, h
