visitor pattern class coffeemachine(object)def _init_(self)pass def get_status(self)return random choice(range(- , )class clock(object)def __init__(self)pass def get_status(self)return "{}:{}format(random randrange( )random randrange( )def main()device_network thermostat()temperatureregulator()doorlock()coffeemachine()light()light()clock()for device in device_networkprint(device get_status()if __name__ ="__main__"main(the output is somewhat messy and looks like this off - - :