<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def reboot(self, client):
 """Execute reboot command on instance."""

        self._set_init_system(client)

        reboot_cmd = "{sudo} '{stop_ssh};{reboot}'".format(
            sudo=self.get_sudo_exec_wrapper(),
            stop_ssh=self.get_stop_ssh_service_cmd(),
            reboot=self.get_reboot_cmd()
        )

        try:
            ipa_utils.execute_ssh_command(
                client,
                reboot_cmd
            )
        except Exception as error:
            raise IpaDistroException(
                'An error occurred rebooting instance: %s' % error
            )
        ipa_utils.clear_cache()