code: def subscribe(self, topic, options=None):
          
  
          def decorator(func):
              if self._started:
                  self.session.subscribe(handler=func, topic=topic, options=options)
              else:
  
                  def subscriber():
                      self.session.subscribe(handler=func, topic=topic, options=options)
  
                  # Wait for the WAMP session to be started
                  self._on_running_callbacks.append(subscriber)
              return func
  
          return decorator
docs: Decorator for the :meth:`AutobahnSync.session.subscribe`
  
          .. note::
              This decorator can be used before :meth:`AutobahnSync.run` is called.
              In such case the actual registration will be done at ``run()`` time.