code: def delete_unnecessary_constant_nodes(tfssa):
      delete_count = delete_nodes_with_only_constant_descendents(tfssa)
      for f in list(tfssa.functions.values()):
          check_connections(f.graph)
      convert_constant_nodes_to_const_ops(tfssa)
      logger.debug("%s nodes deleted", delete_count)
      return delete_count
  
imports: from coremltools import _logger
  from ..basic_graph_ops import check_connections, delete_node, disconnect_edge
label_desc: Use image node_id 3 for calling a global function with example usage: delete_unnecessary_constant_nodes(tfssa) and returns: delete_count