def pad(boxes, top, left, height=None, width=None, bounding_box_format="xyxy"):
    """Pads bounding boxes by adding top and left offsets.

    This function adds padding to the bounding boxes by increasing the 'top'
    and 'left' coordinates by the specified amounts. The method assume the
    input bounding_box_format is `xyxy`.

    Args:
        boxes: Bounding boxes to pad. Shape `(N, 4)` or `(batch, N, 4)`.
        top: Vertical padding to add.
        left: Horizontal padding to add.
        height: Image height. Defaults to None.
        width: Image width. Defaults to None.
        bounding_box_format: The format of the input bounding boxes. Defaults to
            `"xyxy"`.

    Returns:
        Padded bounding boxes in the original format.
    """
    if bounding_box_format != "xyxy":
        raise NotImplementedError
    box_utils = BoundingBox()
    # Switch to tensorflow backend if we are in tf.data pipe
    if backend_utils.in_tf_graph():
        box_utils.backend.set_backend("tensorflow")
    outputs = box_utils.pad(boxes, top, left)
    box_utils.backend.reset()
    return outputs
Pads bounding boxes by adding top and left offsets.

    This function adds padding to the bounding boxes by increasing the 'top'
    and 'left' coordinates by the specified amounts. The method assume the
    input bounding_box_format is `xyxy`.

    Args:
        boxes: Bounding boxes to pad. Shape `(N, 4)` or `(batch, N, 4)`.
        top: Vertical padding to add.
        left: Horizontal padding to add.
        height: Image height. Defaults to None.
        width: Image width. Defaults to None.
        bounding_box_format: The format of the input bounding boxes. Defaults to
            `"xyxy"`.

    Returns:
        Padded bounding boxes in the original format.
    
keras/src/layers/preprocessing/image_preprocessing/bounding_boxes/converters.py