class_docstr: Batch resize during training. This implementation is modified from
  https://github.com/Purkialo/CrowdDet/blob/master/lib/data/CrowdHuman.py.
  
  It provides the data pre-processing as follows:
  - A batch of all images will pad to a uniform size and stack them into
    a torch.Tensor by `DetDataPreprocessor`.
  - `BatchFixShapeResize` resize all images to the target size.
  - Padding images to make sure the size of image can be divisible by
    ``pad_size_divisor``.
  
  Args:
      scale (tuple): Images scales for resizing.
      pad_size_divisor (int): Image size divisible factor.
          Defaults to 1.
      pad_value (Number): The padded pixel value. Defaults to 0.
class_docstr_tok: ["Batch","resize","during","training",".","This","implementation","is","modified","from","https",":","\/\/github.com\/Purkialo\/CrowdDet\/blob\/master\/lib\/data\/CrowdHuman.py",".","It","provides","the","data","pre-processing","as","follows",":","-","A","batch","of","all","images","will","pad","to","a","uniform","size","and","stack","them","into","a","torch.Tensor","by","`","DetDataPreprocessor","`",".","-","`","BatchFixShapeResize","`","resize","all","images","to","the","target","size",".","-","Padding","images","to","make","sure","the","size","of","image","can","be","divisible","by","``","pad_size_divisor","``",".","Args",":","scale","(","tuple",")",":","Images","scales","for","resizing",".","pad_size_divisor","(","int",")",":","Image","size","divisible","factor",".","Defaults","to","1.","pad_value","(","Number",")",":","The","padded","pixel","value",".","Defaults","to","0","."]
docstr: Get the target size of a batch of images based on data and scale.
code: def get_target_size(
      self, height: int, width: int
  ) -> Tuple[int, int, float]:
      """Get the target size of a batch of images based on data and scale."""
      im_size_min = np.min([height, width])
      im_size_max = np.max([height, width])
      scale = self.min_size / im_size_min
      if scale * im_size_max > self.max_size:
          scale = self.max_size / im_size_max
      target_height, target_width = int(round(height * scale)), int(
          round(width * scale)
      )
      return target_height, target_width, scale
  
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 3 for calling the BatchResize obj's underlying member method code with example usage: obj.get_target_size(height, width) and returns: target_height,  target_width,  scale