code: def replace_node(g, original_node, new_node):
      if isinstance(new_node, six.string_types):
          new_node = g[new_node]
      if not isinstance(original_node, six.string_types):
          original_node = original_node.name
  
      for o in list(g[original_node].control_outputs):
          replace_control_source(g, original_node, o, new_node)
      for o in list(g[original_node].outputs):
          replace_source(g, original_node, o, new_node)
      for i in list(g[original_node].control_inputs):
          replace_control_dest(g, i, original_node, new_node)
      for i in list(g[original_node].inputs):
          replace_dest(g, i, original_node, new_node)
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import six
label_desc: Use image node_id 16 for calling a global function with example usage: replace_node(g, original_node, new_node) without return types