code: def forward(
      self, batch_shape: tuple[int, ...], same_on_batch: bool = False
  ) -> dict[str, Tensor]:
      batch_size = batch_shape[0]
      _common_param_check(batch_size, same_on_batch)
      _device, _dtype = _extract_device_dtype(
          [self.drop_width, self.drop_height, self.number_of_drops]
      )
      # self.ksize_factor.expand((batch_size, -1))
      number_of_drops_factor = _adapted_rsampling(
          (batch_size,), self.number_of_drops_sampler
      ).to(device=_device, dtype=torch.long)
      drop_height_factor = _adapted_rsampling(
          (batch_size,), self.drop_height_sampler, same_on_batch
      ).to(device=_device, dtype=torch.long)
      drop_width_factor = _adapted_rsampling(
          (batch_size,), self.drop_width_sampler, same_on_batch
      ).to(device=_device, dtype=torch.long)
      coordinates_factor = _adapted_rsampling(
          (batch_size, int(number_of_drops_factor.max().item()), 2),
          self.coordinates_sampler,
          same_on_batch=same_on_batch,
      ).to(device=_device)
      return {
          "number_of_drops_factor": number_of_drops_factor,
          "coordinates_factor": coordinates_factor,
          "drop_height_factor": drop_height_factor,
          "drop_width_factor": drop_width_factor,
      }
  
file_path: kornia/kornia/augmentation/random_generator/_2d/random_rain.py
imports: from __future__ import annotations
  import torch
  from kornia.augmentation.random_generator.base import RandomGeneratorBase, UniformDistribution
  from kornia.augmentation.utils import _adapted_rsampling, _common_param_check, _range_bound
  from kornia.core import Tensor
  from kornia.utils import _extract_device_dtype
label_desc: Use image node_id 4 for calling the RainGenerator obj's underlying member method code with example usage: obj.forward(batch_shape, same_on_batch) and returns: dict