code: def make_dependence_cmp():
      """
      Create a comparator to represent the dependence of nodes in a graph.
  
      """
      depends = make_depends()
  
      def dependence(a, b):
          """
          A cmp function for nodes in a graph - does a depend on b?
  
          Returns
          -------
          int
              Positive number if a depends on b, negative number
              if b depends on a, 0 otherwise.
  
          """
          if depends((a, b)):
              return 1
          if depends((b, a)):
              return -1
          return 0
  
      return dependence
  
file_path: Theano/theano/gof/sched.py
imports: from __future__ import absolute_import, print_function, division
  from collections import defaultdict
  from six import iteritems
  from theano.gof.graph import list_of_nodes
  from theano.compat import cmp
label_desc: Use image node_id 3 for calling a global function with example usage: make_dependence_cmp() and returns: dependence, int, int, unknown