visitor pattern def test_boot_light_turns_it_off(self)self bedroom_light boot_up(self assertequal(self bedroom_light status def test_boot_system_clock_zeros_it(self)self system_clock boot_up(self assertequal(self system_clock status" : "if __name__ ="__main__"unittest main(setting the execution function for when the program is run from the command line to unittest main(tells python to look for instances of the unittest testcase class and then to run the tests in that class we set up six testsand the status after running the tests looks something like thisran tests in ok each of these had us implement functions we would expect of each functionbut how would the system look if we wanted to implement different profilessay person and person share the houseand they have different preferencessuch as time to get uptime to go to bedand what should happen in the morning or evening they also have different temperatures that they feel most comfortable with since they are friendly peoplethey have agreed on middle ground for when both of them are homebut when one or the other is home they would like to have the system settings set to their perfect configuration simple extension of the system we saw up to now would see an implementation like thisimport random import unittest class light(object)def __init__(selfname)self name name self status self get_status(