code: def delete_asserts(tfssa):
      """
      Delete all nodes that lead only to assertions.
      """
      delete_count = 0
      for f in tfssa.functions.values():
          memo = {}
          for n in f.graph:
              _all_assert_leaves(f.graph, n, memo)
          for m in memo:
              if memo[m]:
                  delete_count += 1
                  delete_node(f.graph, m)
      logging.debug("%d assert nodes deleted", delete_count)
      return delete_count
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  from ..basic_graph_ops import delete_node
  import logging
  import sys
label_desc: Use image node_id 2 for calling a global function with example usage: delete_asserts(tfssa) and returns: delete_count