code: def sample(model_path):
      pred = PredictConfig(
          session_init=SmartInit(model_path),
          model=Model(),
          input_names=["label", "z"],
          output_names=["gen/gen"],
      )
  
      ds = MapData(
          RandomZData((100, 100)),
          lambda dp: [np.arange(100) % 10, dp[0]],
      )
      pred = SimpleDatasetPredictor(pred, ds)
      for o in pred.get_result():
          o = o[0] * 255.0
          viz = stack_patches(o, nr_row=10, nr_col=10)
          viz = cv2.resize(viz, (800, 800))
          interactive_imshow(viz)
  
file_path: tensorpack/examples/GAN/ConditionalGAN-mnist.py
imports: import argparse
  import numpy
  import os
  import cv2
  import tensorflow
  from tensorpack import *
  from tensorpack.dataflow import dataset
  from tensorpack.tfutils.scope_utils import auto_reuse_variable_scope
  from tensorpack.utils.viz import interactive_imshow, stack_patches
  from GAN import GANModelDesc, GANTrainer, RandomZData
label_desc: Use image node_id 3 for calling a global function with example usage: sample(model_path) without return types