code: def make_convolutional_sample(
      model,
      batch_size,
      vanilla=False,
      custom_steps=None,
      eta=1.0,
  ):
      log = dict()
  
      shape = [
          batch_size,
          model.model.diffusion_model.in_channels,
          model.model.diffusion_model.image_size,
          model.model.diffusion_model.image_size,
      ]
  
      with model.ema_scope("Plotting"):
          t0 = time.time()
          if vanilla:
              sample, progrow = convsample(
                  model, shape, make_prog_row=True
              )
          else:
              sample, intermediates = convsample_ddim(
                  model, steps=custom_steps, shape=shape, eta=eta
              )
  
          t1 = time.time()
  
      x_sample = model.decode_first_stage(sample)
  
      log["sample"] = x_sample
      log["time"] = t1 - t0
      log["throughput"] = sample.shape[0] / (t1 - t0)
      print(f'Throughput for this batch: {log["throughput"]}')
      return log
  
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 6 for calling a global function with example usage: make_convolutional_sample(model, batch_size, vanilla, custom_steps, eta) and returns: log