code: def make_ddim_sampling_parameters(
      alphacums, ddim_timesteps, eta, verbose=True
  ):
      # select alphas for computing the variance schedule
      alphas = alphacums[ddim_timesteps]
      alphas_prev = np.asarray(
          [alphacums[0]] + alphacums[ddim_timesteps[:-1]].tolist()
      )
  
      # according the the formula provided in https://arxiv.org/abs/2010.02502
      sigmas = eta * np.sqrt(
          (1 - alphas_prev) / (1 - alphas) * (1 - alphas / alphas_prev)
      )
      if verbose:
          print(
              f"Selected alphas for ddim sampler: a_t: {alphas}; a_(t-1): {alphas_prev}"
          )
          print(
              f"For the chosen value of eta, which is {eta}, "
              f"this results in the following sigma_t schedule for ddim sampler {sigmas}"
          )
      return sigmas, alphas, alphas_prev
  
imports: from collections import OrderedDict
  from copy import copy
  import numpy
  import tensorrt
  import torch
  from polygraphy import cuda
  from polygraphy.backend.common import bytes_from_path
  from polygraphy.backend.trt import engine_from_bytes
  from polygraphy.backend.trt import util
label_desc: Use image node_id 4 for calling a global function with example usage: make_ddim_sampling_parameters(alphacums, ddim_timesteps, eta, verbose) and returns: sigmas,  alphas,  alphas_prev