def make_dependence_cmp():
 depends = make_depends()
 def dependence(a, b):
  '\n        A cmp function for nodes in a graph - does a depend on b?\n\n        Returns\n        -------\n        int\n            Positive number if a depends on b, negative number\n            if b depends on a, 0 otherwise.\n\n        '
  if depends((a, b)):
   return 1
  if depends((b, a)):
   return (-1)
  return 0
 return dependence

def make_dependence_cmp ( ) : depends = make_depends ( ) def dependence ( a , b ) : if depends ( ( a , b ) ) : return 1 if depends ( ( b , a ) ) : return ( - 1 ) return 0 return dependence
create a comparator to represent the dependence of nodes in a graph .