code: def _get_variance(self, timestep, prev_timestep):
      alpha_prod_t = self.alphas_cumprod[timestep]
      alpha_prod_t_prev = (
          self.alphas_cumprod[prev_timestep]
          if prev_timestep >= 0
          else self.final_alpha_cumprod
      )
      beta_prod_t = 1 - alpha_prod_t
      beta_prod_t_prev = 1 - alpha_prod_t_prev
  
      variance = (beta_prod_t_prev / beta_prod_t) * (
          1 - alpha_prod_t / alpha_prod_t_prev
      )
  
      return variance
  
file_path: PaddleHub/modules/image/text_to_image/stable_diffusion_waifu/diffusers/schedulers/scheduling_ddim.py
imports: import math
  from typing import Union
  import numpy
  import paddle
  from ..configuration_utils import ConfigMixin
  from ..configuration_utils import register_to_config
  from .scheduling_utils import SchedulerMixin
label_desc: Use image node_id 2 for calling the DDIMScheduler obj's underlying member method code with example usage: obj._get_variance(timestep, prev_timestep) and returns: variance