code: def projective_rule_parse_demo():
      """
      A demonstration showing the creation and use of a
      ``DependencyGrammar`` to perform a projective dependency
      parse.
      """
      grammar = DependencyGrammar.fromstring(
          """
      'scratch' -> 'cats' | 'walls'
      'walls' -> 'the'
      'cats' -> 'the'
      """
      )
      print(grammar)
      pdp = ProjectiveDependencyParser(grammar)
      trees = pdp.parse(["the", "cats", "scratch", "the", "walls"])
      for tree in trees:
          print(tree)
  
imports: from collections import defaultdict
  from functools import total_ordering
  from itertools import chain
  from nltk.grammar import DependencyGrammar, DependencyProduction, ProbabilisticDependencyGrammar
  from nltk.internals import raise_unorderable_types
  from nltk.parse.dependencygraph import DependencyGraph
label_desc: Use image node_id 2 for calling a global function with example usage: projective_rule_parse_demo() without return types