code: def build_fake_data(num_examples=10):
      """Builds fake MNIST-style data for unit testing."""
  
      class Dummy(object):
          pass
  
      num_examples = 10
      mnist_data = Dummy()
      mnist_data.train = Dummy()
      mnist_data.train.images = np.float32(
          np.random.randn(num_examples, np.prod(IMAGE_SHAPE))
      )
      mnist_data.train.labels = np.int32(
          np.random.permutation(np.arange(num_examples))
      )
      mnist_data.train.num_examples = num_examples
      mnist_data.validation = Dummy()
      mnist_data.validation.images = np.float32(
          np.random.randn(num_examples, np.prod(IMAGE_SHAPE))
      )
      mnist_data.validation.labels = np.int32(
          np.random.permutation(np.arange(num_examples))
      )
      mnist_data.validation.num_examples = num_examples
      return mnist_data
  
imports: import functools
  import os
  import time
  from absl import flags
  from matplotlib import cm
  from matplotlib import figure
  from matplotlib.backends import backend_agg
  import numpy
  from six.moves import urllib
  import tensorflow.compat.v1
  from tensorflow_probability import distributions
  from tensorflow_probability.python.internal import tf_keras
  from tensorflow.contrib.learn.python.learn.datasets import mnist
  from tensorflow.python.training import moving_averages
label_desc: Use image node_id 6 for calling a global function with example usage: build_fake_data(num_examples) and returns: mnist_data