code: def get_layer(self, layer_config, input, in_height, in_width, id):
      if layer_config[0] == "Empty":
          return input
  
      if self.is_expand_dim(input):
          input = tf.reshape(input, [-1, in_height, in_width, 1])
      h, w = layer_config[1], layer_config[2]
  
      if layer_config[0] == "Conv":
          conv_filter = tf.Variable(
              tf.random_uniform([h, w, 1, 1]),
              name="id_%d_conv_%d_%d" % (id, h, w),
          )
          return tf.nn.conv2d(
              input,
              filter=conv_filter,
              strides=[1, 1, 1, 1],
              padding="SAME",
          )
      if layer_config[0] == "Max_pool":
          return tf.nn.max_pool(
              input,
              ksize=[1, h, w, 1],
              strides=[1, 1, 1, 1],
              padding="SAME",
          )
      if layer_config[0] == "Avg_pool":
          return tf.nn.avg_pool(
              input,
              ksize=[1, h, w, 1],
              strides=[1, 1, 1, 1],
              padding="SAME",
          )
  
      print("error:", layer_config)
      raise Exception("%s layer is illegal" % layer_config[0])
  
imports: from __future__ import absolute_import, division, print_function
  import logging
  import math
  import tempfile
  import time
  import argparse
  import tensorflow
  from tensorflow.examples.tutorials.mnist import input_data
  import nni
label_desc: Use image node_id 4 for calling the MnistNetwork obj's underlying member method code with example usage: obj.get_layer(layer_config, input, in_height, in_width, id) and returns: input, tf, tf, tf