code: def _strip_consts(graph_def, max_const_size=32):
      """Strip large constant values from graph_def.
  
      This is mostly a utility function for graph(), and also originates here:
      https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/tutorials/deepdream/deepdream.ipynb
      """
      strip_def = tf.GraphDef()
      for n0 in graph_def.node:
          n = strip_def.node.add()
          n.MergeFrom(n0)
          if n.op == "Const":
              tensor = n.attr["value"].tensor
              size = len(tensor.tensor_content)
              if size > max_const_size:
                  tensor.tensor_content = tf.compat.as_bytes(
                      "<stripped %d bytes>" % size
                  )
      return strip_def
  
file_path: lucid/lucid/misc/io/showing.py
imports: from __future__ import absolute_import, division, print_function
  from io import BytesIO
  import base64
  import logging
  import numpy
  import IPython.display
  from string import Template
  import tensorflow
  from lucid.misc.io.serialize_array import serialize_array, array_to_jsbuffer
  from lucid.misc.io.collapse_channels import collapse_channels
label_desc: Use image node_id 8 for calling a global function with example usage: _strip_consts(graph_def, max_const_size) and returns: strip_def