code: def _build_stack(self) -> List[Callable]:
          
  
          stack = []
  
          for m in self.manager.middlewares:
              try:
                  stack.append(getattr(m(self), self.name))
              except AttributeError:
                  pass
  
          return stack
docs: Generates the stack of functions to call. It looks at the ordered list
          of all middlewares and only keeps those which have the method we're
          trying to call.