docs: def withHeartbeater(cls, heartbeater):
          """Connect a SockJSProtocolMachine to its heartbeater."""
          instance = cls(heartbeater)
          heartbeater.writeHeartbeat = instance.heartbeat
          return instance