class_docstr: Batch random resize which synchronizes the random size across ranks.
  
  Args:
      random_size_range (tuple): The multi-scale random range during
          multi-scale training.
      interval (int): The iter interval of change
          image size. Defaults to 10.
      size_divisor (int): Image size divisible factor.
          Defaults to 32.
class_docstr_tok: ["Batch","random","resize","which","synchronizes","the","random","size","across","ranks",".","Args",":","random_size_range","(","tuple",")",":","The","multi-scale","random","range","during","multi-scale","training",".","interval","(","int",")",":","The","iter","interval","of","change","image","size",".","Defaults","to","10.","size_divisor","(","int",")",":","Image","size","divisible","factor",".","Defaults","to","32","."]
code: def __init__(
      self,
      random_size_range: Tuple[int, int],
      interval: int = 10,
      size_divisor: int = 32,
  ) -> None:
      super().__init__()
      self.rank, self.world_size = get_dist_info()
      self._input_size = None
      self._random_size_range = (
          round(random_size_range[0] / size_divisor),
          round(random_size_range[1] / size_divisor),
      )
      self._interval = interval
      self._size_divisor = size_divisor
  
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 BatchSyncRandomResize object from inherited base classes: nn with example: obj = BatchSyncRandomResize(random_size_range, interval, size_divisor)