code: def run_final_eval(
      train_session,
      module_spec,
      class_count,
      image_lists,
      jpeg_data_tensor,
      decoded_image_tensor,
      resized_image_tensor,
      bottleneck_tensor,
  ):
      """Runs a final evaluation on an eval graph using the test data set.
  
      Args:
        train_session: Session for the train graph with the tensors below.
        module_spec: The hub.ModuleSpec for the image module being used.
        class_count: Number of classes
        image_lists: OrderedDict of training images for each label.
        jpeg_data_tensor: The layer to feed jpeg image data into.
        decoded_image_tensor: The output of decoding and resizing the image.
        resized_image_tensor: The input node of the recognition graph.
        bottleneck_tensor: The bottleneck output layer of the CNN graph.
      """
      (
          test_bottlenecks,
          test_ground_truth,
          test_filenames,
      ) = get_random_cached_bottlenecks(
          train_session,
          image_lists,
          FLAGS.test_batch_size,
          "testing",
          FLAGS.bottleneck_dir,
          FLAGS.image_dir,
          jpeg_data_tensor,
          decoded_image_tensor,
          resized_image_tensor,
          bottleneck_tensor,
          FLAGS.tfhub_module,
      )
  
      (
          eval_session,
          _,
          bottleneck_input,
          ground_truth_input,
          evaluation_step,
          prediction,
      ) = build_eval_session(module_spec, class_count)
      test_accuracy, predictions = eval_session.run(
          [evaluation_step, prediction],
          feed_dict={
              bottleneck_input: test_bottlenecks,
              ground_truth_input: test_ground_truth,
          },
      )
      logging.info(
          "Final test accuracy = %.1f%% (N=%d)",
          test_accuracy * 100,
          len(test_bottlenecks),
      )
  
      if FLAGS.print_misclassified_test_images:
          logging.info("=== MISCLASSIFIED TEST IMAGES ===")
          for i, test_filename in enumerate(test_filenames):
              if predictions[i] != test_ground_truth[i]:
                  logging.info(
                      "%70s  %s",
                      test_filename,
                      list(image_lists.keys())[predictions[i]],
                  )
  
imports: from absl import logging
  import argparse
  import collections
  from datetime import datetime
  import hashlib
  import os.path
  import random
  import re
  import sys
  import numpy
  import tensorflow
  import tensorflow_hub
  from tensorflow.contrib import quantize
label_desc: Use image node_id 17 for calling a global function with example usage: run_final_eval(train_session, module_spec, class_count, image_lists, jpeg_data_tensor, decoded_image_tensor, resized_image_tensor, bottleneck_tensor) without return types