code: def convsample_ddim(model, steps, shape, eta=1.0):
      ddim = DDIMSampler(model)
      bs = shape[0]
      shape = shape[1:]
      samples, intermediates = ddim.sample(
          steps,
          batch_size=bs,
          shape=shape,
          eta=eta,
          verbose=False,
      )
      return samples, intermediates
  
imports: import argparse
  import datetime
  import glob
  import os
  import sys
  import time
  import numpy
  import torch
  import yaml
  from ldm.models.diffusion.ddim import DDIMSampler
  from ldm.util import instantiate_from_config
  from omegaconf import OmegaConf
  from PIL import Image
  from tqdm import trange
label_desc: Use image node_id 5 for calling a global function with example usage: convsample_ddim(model, steps, shape, eta) and returns: samples,  intermediates