code: def _get_new_batch_shape(
      param: ParamItem, batch_shape: torch.Size
  ) -> torch.Size:
      """Get the new batch shape if the augmentation changes the image size.
  
      Note:
         Augmentations that change the image size must provide the parameter `output_size`.
      """
      if param.data is None:
          return batch_shape
      if isinstance(param.data, list):
          for p in param.data:
              batch_shape = _get_new_batch_shape(p, batch_shape)
      elif "output_size" in param.data:
          if not (param.data["batch_prob"] > 0.5)[0]:
              # Augmentations that change the image size must be applied equally to all elements in batch.
              # If the augmentation is not applied, return the same batch shape.
              return batch_shape
          new_batch_shape = list(batch_shape)
          new_batch_shape[-2:] = param.data["output_size"][0]
          batch_shape = torch.Size(new_batch_shape)
      return batch_shape
  
imports: from typing import Any, Dict, Iterator, List, Optional, Tuple, Union, cast
  import torch
  import kornia.augmentation
  from kornia.augmentation.base import _AugmentationBase
  from kornia.augmentation.utils import override_parameters
  from kornia.core import Module, Tensor, as_tensor
  from kornia.utils import eye_like
  from .base import ImageSequentialBase
  from .params import ParamItem
label_desc: Use image node_id 1 for calling a global function with example usage: _get_new_batch_shape(param, batch_shape) and returns: batch_shape, batch_shape, batch_shape