code: def debug_tensor(s, msg=None, summarize=10):
      """Print the shape and value of a tensor at test time. Return a new tensor."""
      if not msg:
          msg = s.name
      return tf.Print(
          s, [tf.shape(s), s], msg + " ", summarize=summarize
      )
  
imports: from __future__ import print_function
  import codecs
  import collections
  import json
  import math
  import os
  import sys
  import time
  from distutils import version
  import tensorflow
label_desc: Use image node_id 9 for calling a global function with example usage: debug_tensor(s, msg, summarize) and returns: tf