code: def add_middleware(middleware: EFBMiddleware):
      
      global middlewares
      if isinstance(middleware, EFBMiddleware):
          middlewares.append(middleware)
      else:
          raise TypeError("Middleware instance is expected")
docs: Register a middleware with the coordinator.
  
      Args:
          middleware (EFBMiddleware): Middleware to register