code: def run(mini_batch):
      print(f"run method start: {__file__}, run({mini_batch})")
      resultList = []
      in_tensor = g_tf_sess.graph.get_tensor_by_name("network/X:0")
      output = g_tf_sess.graph.get_tensor_by_name(
          "network/output/MatMul:0"
      )
  
      for image in mini_batch:
          # prepare each image
          data = Image.open(image)
          np_im = np.array(data).reshape((1, 784))
          # perform inference
          inference_result = output.eval(
              feed_dict={in_tensor: np_im}, session=g_tf_sess
          )
          # find best probability, and add to result list
          best_result = np.argmax(inference_result)
          resultList.append(
              "{}: {}".format(os.path.basename(image), best_result)
          )
  
      return resultList
  
imports: import os
  import numpy
  import tensorflow
  from PIL import Image
  from azureml.core import Model
label_desc: Use image node_id 2 for calling a global function with example usage: run(mini_batch) and returns: resultList