class_docstr: Zooms an ND Box with same padding or slicing setting with Zoom().
  
  Args:
      zoom: The zoom factor along the spatial axes.
          If a float, zoom is the same for each spatial axis.
          If a sequence, zoom should contain one value for each spatial axis.
      keep_size: Should keep original size (padding/slicing if needed), default is True.
      kwargs: other arguments for the `np.pad` or `torch.pad` function.
          note that `np.pad` treats channel dimension as the first dimension.
class_docstr_tok: ["Zooms","an","ND","Box","with","same","padding","or","slicing","setting","with","Zoom","(",")",".","Args",":","zoom",":","The","zoom","factor","along","the","spatial","axes",".","If","a","float",",","zoom","is","the","same","for","each","spatial","axis",".","If","a","sequence",",","zoom","should","contain","one","value","for","each","spatial","axis",".","keep_size",":","Should","keep","original","size","(","padding\/slicing","if","needed",")",",","default","is","True",".","kwargs",":","other","arguments","for","the","`","np.pad","`","or","`","torch.pad","`","function",".","note","that","`","np.pad","`","treats","channel","dimension","as","the","first","dimension","."]
docstr: Args:
      boxes: source bounding boxes, Nx4 or Nx6 torch tensor or ndarray. The box mode is assumed to be ``StandardMode``
      src_spatial_size: original image spatial size before zooming, used only when keep_size=True.
docstr_tok: ["Args",":","boxes",":","source","bounding","boxes",",","Nx4","or","Nx6","torch","tensor","or","ndarray",".","The","box","mode","is","assumed","to","be","``","StandardMode","``","src_spatial_size",":","original","image","spatial","size","before","zooming",",","used","only","when","keep_size=True","."]
code: def __call__(
      self,
      boxes: NdarrayTensor,
      src_spatial_size: Sequence[int] | int | None = None,
  ) -> NdarrayTensor:
      """
      Args:
          boxes: source bounding boxes, Nx4 or Nx6 torch tensor or ndarray. The box mode is assumed to be ``StandardMode``
          src_spatial_size: original image spatial size before zooming, used only when keep_size=True.
      """
      spatial_dims: int = get_spatial_dims(boxes=boxes)
      self._zoom = ensure_tuple_rep(
          self.zoom, spatial_dims
      )  # match the spatial image dim
  
      if not self.keep_size:
          return zoom_boxes(boxes, self._zoom)
  
      if src_spatial_size is None:
          raise ValueError(
              "keep_size=True, src_spatial_size must be provided."
          )
  
      src_spatial_size = ensure_tuple_rep(
          src_spatial_size, spatial_dims
      )
      dst_spatial_size = [
          int(round(z * ss))
          for z, ss in zip(self._zoom, src_spatial_size)
      ]
      self._zoom = tuple(
          ds / float(ss)
          for ss, ds in zip(src_spatial_size, dst_spatial_size)
      )
      zoomed_boxes = zoom_boxes(boxes, self._zoom)
  
      # See also keep_size in monai.transforms.spatial.array.Zoom()
      if not np.allclose(
          np.array(src_spatial_size), np.array(dst_spatial_size)
      ):
          for axis, (od, zd) in enumerate(
              zip(src_spatial_size, dst_spatial_size)
          ):
              diff = od - zd
              half = abs(diff) // 2
              if diff > 0:  # need padding (half, diff - half)
                  zoomed_boxes[:, axis] = zoomed_boxes[:, axis] + half
                  zoomed_boxes[:, axis + spatial_dims] = (
                      zoomed_boxes[:, axis + spatial_dims] + half
                  )
              elif diff < 0:  # need slicing (half, half + od)
                  zoomed_boxes[:, axis] = zoomed_boxes[:, axis] - half
                  zoomed_boxes[:, axis + spatial_dims] = (
                      zoomed_boxes[:, axis + spatial_dims] - half
                  )
      return zoomed_boxes
  
imports: from __future__ import annotations
  from typing import Any, Sequence
  import numpy
  import torch
  from monai.config.type_definitions import DtypeLike, NdarrayOrTensor, NdarrayTensor
  from monai.data.box_utils import BoxMode, clip_boxes_to_image, convert_box_mode, convert_box_to_standard_mode, get_spatial_dims, spatial_crop_boxes, standardize_empty_box
  from monai.transforms import Rotate90, SpatialCrop
  from monai.transforms.transform import Transform
  from monai.utils import ensure_tuple, ensure_tuple_rep, fall_back_tuple, look_up_option
  from monai.utils.enums import TransformBackends
  from .box_ops import apply_affine_to_boxes, convert_box_to_mask, convert_mask_to_box, flip_boxes, resize_boxes, rot90_boxes, select_labels, zoom_boxes
label_desc: Use image node_id 2 for calling the ZoomBox obj's underlying member method code with example usage: obj.__call__(boxes, src_spatial_size) and returns: zoomed_boxes, zoom_boxes