design pattern quick reference class genericview(object)def __init__(self)pass def generate_response(selfdata)print(datadef main(name)request_handler genericcontroller(request_handler handle(nameif __name__ ="__main__"main(sys argv[ ]publisher-subscriber publish_subscribe py class message(object)def __init__(self)self payload none self topic "allclass subscriber(object)def __init__(selfdispatchertopic)dispatcher subscribe(selftopicdef process(selfmessage)print("message{}format(message payload)class publisher(object)def __init__(selfdispatcher)self dispatcher dispatcher def publish(selfmessage)self dispatcher send(message