visitor pattern def visit(selfelement)if self person_ _homeif self person_ _homeelement status elseelement status elif self person_ _homeelement status elseelement status class clock(visitable)def __init__(selfname)self name name self status self get_status(def get_status(self)return "{}:{}format(random randrange( )random randrange( )def is_online(self)return true def boot_up(self)self status " : class clockstatusupdatevisitor(abstractvisitor)def __init__(selfperson_ _homeperson_ _home)self person_ _home person_ _home self person_ _home person_ _home def visit(selfelement)if self person_ _homeif self person_ _homepass else