code: def test_posort_easy():
      nodes = "asdfghjkl"
  
      def mycmp(a, b):
          if a < b:
              return -1
          elif a > b:
              return 1
          else:
              return 0
  
      assert posort(nodes, mycmp) == list("adfghjkls")
  
file_path: Theano/theano/gof/tests/test_sched.py
imports: from __future__ import absolute_import, print_function, division
  from theano.gof.sched import make_dependence_cmp, sort_apply_nodes, reverse_dict, _toposort, posort
  from theano import tensor
  from theano.gof.graph import io_toposort
  from theano.compat import cmp
label_desc: Use image node_id 5 for calling a global function with example usage: test_posort_easy() and returns: unknown, int, int