code: def build_summaries():
      episode_reward = tf.Variable(0.0)
      scalar_summary("Reward", episode_reward)
      episode_ave_max_q = tf.Variable(0.0)
      scalar_summary("Qmax Value", episode_ave_max_q)
      logged_epsilon = tf.Variable(0.0)
      scalar_summary("Epsilon", logged_epsilon)
      # Threads shouldn't modify the main graph, so we use placeholders
      # to assign the value of every summary (instead of using assign method
      # in every thread, that would keep creating new ops in the graph)
      summary_vars = [episode_reward, episode_ave_max_q, logged_epsilon]
      summary_placeholders = [
          tf.placeholder("float") for i in range(len(summary_vars))
      ]
      assign_ops = [
          summary_vars[i].assign(summary_placeholders[i])
          for i in range(len(summary_vars))
      ]
      summary_op = merge_all_summaries()
      return summary_placeholders, assign_ops, summary_op
  
imports: from __future__ import division, print_function, absolute_import
  import threading
  import random
  import numpy
  import time
  from skimage.transform import resize
  from skimage.color import rgb2gray
  from collections import deque
  import gym
  import tensorflow.compat.v1
  import tflearn
label_desc: Use image node_id 5 for calling a global function with example usage: build_summaries() and returns: summary_placeholders,  assign_ops,  summary_op