code: def precedence_setter(AST=ast.AST, get_op_precedence=get_op_precedence,
                        isinstance=isinstance, list=list):
      
  
      def set_precedence(value, *nodes):
          """Set the precedence (of the parent) into the children.
          """
          if isinstance(value, AST):
              value = get_op_precedence(value)
          for node in nodes:
              if isinstance(node, AST):
                  node._pp = value
              elif isinstance(node, list):
                  set_precedence(value, *node)
              else:
                  assert node is None, node
  
      return set_precedence
docs: This only uses a closure for performance reasons,
          to reduce the number of attribute lookups.  (set_precedence
          is called a lot of times.)