code: def apply(self, transformation, node):
          '''
          High-level function to call a `transformation' on a `node'.
          If the transformation is an analysis, the result of the analysis
          is displayed.
          '''
          assert issubclass(transformation, (Transformation, Analysis))
          a = transformation()
          a.attach(self)
          res = a.apply(node)
  
          # the transformation updated the AST, so analyse may need to be rerun
          # we could use a finer-grain caching system, and provide a way to flag
          # some analyses as `unmodified' by the transformation, as done in LLVM
          # (and PIPS ;-)
          if a.update:
              self._cache.clear()
          return ref apply(self, transformation, node):
          '''
          High-level function to call a `transformation' on a `node'.
          If the transformation is an analysis, the result of the analysis
          is displayed.
          '''
          assert issubclass(transformation, (Transformation, Analysis))
          a = transformation()
          a.attach(self)
          res = a.apply(node)
  
          # the transformation updated the AST, so analyse may need to be rerun
          # we could use a finer-grain caching system, and provide a way to flag
          # some analyses as `unmodified' by the transformation, as done in LLVM
          # (and PIPS ;-)
          if a.update:
              self._cache.clear()
          return res
docs: High-level function to call a `transformation' on a `node'.
          If the transformation is an analysis, the result of the analysis
          is displayed.