<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def reset(self):
 """Attempts to reset the dongle to a known state. When called, this method will reset the internal state of the object, and disconnect any active connections. """

        logger.debug('resetting dongle state')

        self._clear()

        if self.api is not None:
            self._set_state(Dongle._STATE_RESET)
            self.api.ble_cmd_gap_set_mode(gap_discoverable_mode['gap_non_discoverable'], gap_connectable_mode['gap_non_connectable'])
            self._wait_for_state(self._STATE_RESET)

            for i in range(self.supported_connections):
                self._set_conn_state(i, self._STATE_DISCONNECTING)
                self.api.ble_cmd_connection_disconnect(i)	
                self._wait_for_conn_state(i, self._STATE_DISCONNECTING)

        logger.debug('reset completed')