chain of responsibility pattern if we wanted to adhere to the single responsibility principle in the preceding examplewe would need piece of code to handle the user retrieval and another piece of code to validate that the user matches the password yet another piece of code would generate message based on the path of the requestandfinallysome piece of code would return the response to the browser before we attempt to write the code for the serverwe will build up some intuition about the solution using sample application in our sample applicationwe have four functionseach of which simply prints out message def function_ ()print("function_ "def function_ ()print("function_ "def function_ ()print("function_ "def function_ ()print("function_ "def main_function()function_ (function_ (function_ (function_ (if __name__ ="__main__"main_function(from our discussion in the beginning of this sectionwe know that it is not ideal to have the main_function call each of the functions in ordersince in real-world scenario this leads to the messy code we encountered in the previous section