code: def visualize_ops(im, ops=None, num_steps=10):
      """Visualize ops by applying each op by varying amounts."""
      ops = ops if ops else RANDAUG_OPS
      w, h, magnitudes = (
          im.size[0],
          im.size[1],
          np.linspace(0, 1, num_steps),
      )
      output = Image.new("RGB", (w * num_steps, h * len(ops)))
      for i, op in enumerate(ops):
          for j, m in enumerate(magnitudes):
              out = apply_op(im, op, prob=1.0, magnitude=m)
              output.paste(out, (j * w, i * h))
      return output
  
file_path: pycls/pycls/datasets/augment.py
imports: import random
  import numpy
  from PIL import Image, ImageEnhance, ImageOps
label_desc: Use image node_id 6 for calling a global function with example usage: visualize_ops(im, ops, num_steps) and returns: output