class_docstr: 2D boxes containing N or BxN boxes.
  
  Args:
      boxes: 2D boxes, shape of :math:`(N, 4, 2)`, :math:`(B, N, 4, 2)` or a list of :math:`(N, 4, 2)`.
          See below for more details.
      raise_if_not_floating_point: flag to control floating point casting behaviour when `boxes` is not a
          floating point tensor. True to raise an error when `boxes` isn't a floating point tensor, False
          to cast to float.
      mode: the box format of the input boxes.
  
  Note:
      **2D boxes format** is defined as a floating data type tensor of shape ``Nx4x2`` or ``BxNx4x2``
      where each box is a `quadrilateral <https://en.wikipedia.org/wiki/Quadrilateral>`_ defined by it's
      4 vertices coordinates (A, B, C, D). Coordinates must be in ``x, y`` order. The height and width of
      a box is defined as ``width = xmax - xmin + 1`` and ``height = ymax - ymin + 1``. Examples of
      `quadrilaterals <https://en.wikipedia.org/wiki/Quadrilateral>`_ are rectangles, rhombus and trapezoids.
class_docstr_tok: ["2D","boxes","containing","N","or","BxN","boxes",".","Args",":","boxes",":","2D","boxes",",","shape","of",":","math",":","`","(","N",",","4",",","2",")","`",",",":","math",":","`","(","B",",","N",",","4",",","2",")","`","or","a","list","of",":","math",":","`","(","N",",","4",",","2",")","`",".","See","below","for","more","details",".","raise_if_not_floating_point",":","flag","to","control","floating","point","casting","behaviour","when","`","boxes","`","is","not","a","floating","point","tensor",".","True","to","raise","an","error","when","`","boxes","`","is","n't","a","floating","point","tensor",",","False","to","cast","to","float",".","mode",":","the","box","format","of","the","input","boxes",".","Note",":","*","*","2D","boxes","format","*","*","is","defined","as","a","floating","data","type","tensor","of","shape","``","Nx4x2","``","or","``","BxNx4x2","``","where","each","box","is","a","`","quadrilateral","<","https",":","\/\/en.wikipedia.org\/wiki\/Quadrilateral",">","`","_","defined","by","it's","4","vertices","coordinates","(","A",",","B",",","C",",","D",")",".","Coordinates","must","be","in","``","x",",","y","``","order",".","The","height","and","width","of","a","box","is","defined","as","``","width","=","xmax","-","xmin","+","1","``","and","``","height","=","ymax","-","ymin","+","1","``",".","Examples","of","`","quadrilaterals","<","https",":","\/\/en.wikipedia.org\/wiki\/Quadrilateral",">","`","_","are","rectangles",",","rhombus","and","trapezoids","."]
docstr: Pad a bounding box.
  
  Args:
      padding_size: (B, 4)
code: def unpad(self, padding_size: Tensor) -> Boxes:
      """Pad a bounding box.
  
      Args:
          padding_size: (B, 4)
      """
      if not (
          len(padding_size.shape) == 2 and padding_size.size(1) == 4
      ):
          raise RuntimeError(
              f"Expected padding_size as (B, 4). Got {padding_size.shape}."
          )
      self._data[..., 0] -= padding_size[..., None, :1].to(
          device=self._data.device
      )  # left padding
      self._data[..., 1] -= padding_size[..., None, 2:3].to(
          device=self._data.device
      )  # top padding
      return self
  
imports: from __future__ import annotations
  from typing import Optional, cast
  import torch
  from torch import Size
  from kornia.core import Tensor, stack, zeros
  from kornia.geometry.bbox import validate_bbox
  from kornia.geometry.linalg import transform_points
  from kornia.utils import eye_like
label_desc: Use image node_id 9 for calling the Boxes obj's underlying member method code with example usage: obj.unpad(padding_size) and returns: self