def METHOD_NAME(self, num_samples_per_batch: int):
    """Updates the dynamic number of rays per batch variable,
    based on the total number of samples in the last batch of rays."""
    self.dynamic_num_rays_per_batch = int(
        self.dynamic_num_rays_per_batch * (self.config.target_num_samples / num_samples_per_batch)
    )