code: def transitive_closure(m, orig, rel):
      '''
      Generate the closure over a transitive relationship in depth-first fashion
      '''
      #FIXME: Broken for now
      links = list(m.match(orig, rel))
      for link in links:
          yield link[0][TARGET]
          yield from transitive_closure(m, target, relf transitive_closure(m, orig, rel):
      '''
      Generate the closure over a transitive relationship in depth-first fashion
      '''
      #FIXME: Broken for now
      links = list(m.match(orig, rel))
      for link in links:
          yield link[0][TARGET]
          yield from transitive_closure(m, target, rel)
docs: Generate the closure over a transitive relationship in depth-first fashion