code: def post_proc(img, config):
      """Post process image `img` according to the dataset in `config`."""
      x = img
      x = np.minimum(1.0, np.maximum(0.0, x))  # clipping
      if dataset_is_mnist_family(config["dataset"]):
          x = np.reshape(x, (-1, 28, 28))
          x = np.stack((x,) * 3, -1)  # grey -> rgb
      return x
  
imports: import functools
  import importlib
  import os
  from magenta.models.latent_transfer import local_mnist
  import numpy
  from PIL import Image
  import tensorflow.compat.v1
label_desc: Use image node_id 12 for calling a global function with example usage: post_proc(img, config) and returns: x