code: def make_depends():
      @memodict
      def depends(pair):
          """
          Returns True if a depends on b.
  
          """
          a, b = pair
          return any(bout in a.inputs for bout in b.outputs) or any(
              depends((ainp.owner, b))
              for ainp in a.inputs
              if ainp.owner
          )
  
      return depends
  
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 2 for calling a global function with example usage: make_depends() and returns: depends, unknown