visitor pattern def update_status(selfperson_ _homeperson_ _home)if person_ _homeself status elif person_ _homeself status elseself status class coffeemachine(object)def __init__(selfname)self name name self status self get_status(def get_status(self)return random choice(range(- , )def is_online(self)return self status !- def boot_up(self)self status def update_status(selfperson_ _homeperson_ _home)if person_ _homeif person_ _homeself status elseself status elif person_ _homeself status elseself status class clock(object)def __init__(selfname)self name name self status self get_status(