code: def pre_process(self, req, params):
          
  
          post_list = []
  
          # Walk through the list of extensions
          for ext in self.extensions:
              if ext.isgenerator:
                  gen = ext(req, **params)
                  try:
                      # Perform the preprocessing stage
                      result = gen.next()
                      if result:
                          return self.wrap(req, result), post_list
                  except StopIteration:
                      # Only want to pre-process, I guess
                      continue
  
                  # Save generator for post-processing
                  post_list.insert(0, gen)
              else:
                  # Save extension for post-processing
                  post_list.insert(0, ext)
  
          # Return the post-processing list
          return None, post_list
docs: Pre-process the extensions for the action.  If any
          pre-processing extension yields a value which tests as True,
          extension pre-processing aborts and that value is returned;
          otherwise, None is returned.  Return value is always a tuple,
          with the second element of the tuple being a list to feed to
          post_process().