chain of responsibility pattern def execute(selfrequest)if ' in requestprint("executing type function class with request [{}]format(request)request "join([ for in request if !' ']self next_to_execute execute(requestclass function class(object)def __init__(self)self next_to_execute catchall(def execute(selfrequest)if ' in requestprint("executing type function class with request [{}]format(request)request "join([ for in request if !' ']self next_to_execute execute(requestdef main_function(headrequest)head execute(requestif __name__ ="__main__"hd function class(current hd current next_to_execute function class(current current next_to_execute current next_to_execute function class(current current next_to_execute current next_to_execute function class(main_function(hd" "