code: def get_inAndout_tensor():
      ops = tf.get_default_graph().get_operations()
      all_tensor_names = {
          output.name for op in ops for output in op.outputs
      }
      tensor_dict = {}
      outputKeys = [
          "num_detections",
          "detection_boxes",
          "detection_scores",
          "detection_classes",
      ]
      for key in outputKeys:
          tensor_name = key + ":0"
          if tensor_name in all_tensor_names:
              tensor_dict[
                  key
              ] = tf.get_default_graph().get_tensor_by_name(tensor_name)
      image_tensor = tf.get_default_graph().get_tensor_by_name(
          "image_tensor:0"
      )
      return tensor_dict, image_tensor
  
file_path: deep-learning-for-image-processing/others_project/readPbFile/using_function.py
imports: import collections
  import six
  import PIL.Image
  import PIL.ImageDraw
  import PIL.ImageFont
  import numpy
  import tensorflow
  import cv2
label_desc: Use image node_id 5 for calling a global function with example usage: get_inAndout_tensor() and returns: tensor_dict,  image_tensor