code: def get_timesteps(self, p, steps):
      discard_next_to_last_sigma = (
          self.config is not None
          and self.config.options.get(
              "discard_next_to_last_sigma", False
          )
      )
      if (
          opts.always_discard_next_to_last_sigma
          and not discard_next_to_last_sigma
      ):
          discard_next_to_last_sigma = True
          p.extra_generation_params["Discard penultimate sigma"] = True
  
      steps += 1 if discard_next_to_last_sigma else 0
  
      timesteps = torch.clip(
          torch.asarray(
              list(range(0, 1000, 1000 // steps)), device=devices.device
          )
          + 1,
          0,
          999,
      )
  
      return timesteps
  
imports: import torch
  import inspect
  import sys
  from modules import devices, sd_samplers_common, sd_samplers_timesteps_impl
  from modules.sd_samplers_cfg_denoiser import CFGDenoiser
  from modules.script_callbacks import ExtraNoiseParams, extra_noise_callback
  from modules.shared import opts
  import modules.shared
label_desc: Use image node_id 2 for calling the CompVisSampler obj's underlying member method code with example usage: obj.get_timesteps(p, steps) and returns: timesteps