def add_listener(self, on_heartbeat_restored=None, on_heartbeat_stopped=None):
self._listeners.append((on_heartbeat_restored, on_heartbeat_stopped))<EOL>
Registers a HeartBeat listener. Listener is invoked when a HeartBeat related event occurs.

:param on_heartbeat_restored: (Function), function to be called when a HeartBeat is restored (optional).
:param on_heartbeat_stopped:  (Function), function to be called when a HeartBeat is stopped (optional).