class_docstr: Fixed size padding for batch images.
  
  Args:
      size (Tuple[int, int]): Fixed padding size. Expected padding
          shape (h, w). Defaults to None.
      img_pad_value (int): The padded pixel value for images.
          Defaults to 0.
      pad_mask (bool): Whether to pad instance masks. Defaults to False.
      mask_pad_value (int): The padded pixel value for instance masks.
          Defaults to 0.
      pad_seg (bool): Whether to pad semantic segmentation maps.
          Defaults to False.
      seg_pad_value (int): The padded pixel value for semantic
          segmentation maps. Defaults to 255.
class_docstr_tok: ["Fixed","size","padding","for","batch","images",".","Args",":","size","(","Tuple","[","int",",","int","]",")",":","Fixed","padding","size",".","Expected","padding","shape","(","h",",","w",")",".","Defaults","to","None",".","img_pad_value","(","int",")",":","The","padded","pixel","value","for","images",".","Defaults","to","0.","pad_mask","(","bool",")",":","Whether","to","pad","instance","masks",".","Defaults","to","False",".","mask_pad_value","(","int",")",":","The","padded","pixel","value","for","instance","masks",".","Defaults","to","0.","pad_seg","(","bool",")",":","Whether","to","pad","semantic","segmentation","maps",".","Defaults","to","False",".","seg_pad_value","(","int",")",":","The","padded","pixel","value","for","semantic","segmentation","maps",".","Defaults","to","255","."]
code: def __init__(
      self,
      size: Tuple[int, int],
      img_pad_value: int = 0,
      pad_mask: bool = False,
      mask_pad_value: int = 0,
      pad_seg: bool = False,
      seg_pad_value: int = 255,
  ) -> None:
      super().__init__()
      self.size = size
      self.pad_mask = pad_mask
      self.pad_seg = pad_seg
      self.img_pad_value = img_pad_value
      self.mask_pad_value = mask_pad_value
      self.seg_pad_value = seg_pad_value
  
imports: import random
  from numbers import Number
  from typing import List, Optional, Sequence, Tuple, Union
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from mmengine.dist import barrier, broadcast, get_dist_info
  from mmengine.logging import MessageHub
  from mmengine.model import BaseDataPreprocessor, ImgDataPreprocessor
  from mmengine.structures import PixelData
  from mmengine.utils import is_seq_of
  from torch import Tensor
  from mmdet.models.utils import unfold_wo_center
  from mmdet.models.utils.misc import samplelist_boxtype2tensor
  from mmdet.registry import MODELS
  from mmdet.structures import DetDataSample
  from mmdet.structures.mask import BitmapMasks
  from mmdet.utils import ConfigType
label_desc: Use image node_id 1 to create a new BatchFixedSizePad object from inherited base classes: nn with example: obj = BatchFixedSizePad(size, img_pad_value, pad_mask, mask_pad_value, pad_seg, seg_pad_value)