<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def on_switch_state_changed( self, func: Callable[['BaseUnit', SwitchNumber, Optional[bool]], None]):
 """ Define the switch state changed callback implementation. Expected signature is: switch_state_changed_callback(base_unit, switch_number, state) base_unit: the device instance for this callback switch_number: the switch whose state has changed state: True if switch turned on, or False if switch turned off """

        self._on_switch_state_changed = func