code: def setup_img2img_steps(p, steps=None):
      if opts.img2img_fix_steps or steps is not None:
          requested_steps = steps or p.steps
          steps = (
              int(requested_steps / min(p.denoising_strength, 0.999))
              if p.denoising_strength > 0
              else 0
          )
          t_enc = requested_steps - 1
      else:
          steps = p.steps
          t_enc = int(min(p.denoising_strength, 0.999) * steps)
  
      return steps, t_enc
  
imports: import inspect
  from collections import namedtuple
  import numpy
  import torch
  from PIL import Image
  from modules import devices, images, sd_vae_approx, sd_samplers, sd_vae_taesd, shared, sd_models
  from modules.shared import opts, state
  import k_diffusion.sampling
label_desc: Use image node_id 1 for calling a global function with example usage: setup_img2img_steps(p, steps) and returns: steps,  t_enc