new_contents: from os import environ
  from twisted.internet.defer import inlineCallbacks
  from autobahn.twisted.wamp import ApplicationSession, ApplicationRunner
  # or: from autobahn.asyncio.wamp import ApplicationSession
  
  
  class Component(ApplicationSession):
      @inlineCallbacks
      def onJoin(self, details):
          # listening for the corresponding message from the "backend"
          # (any session that .publish()es to this topic).
          def onevent(msg):
              print("Got event: {}".format(msg))
          yield self.subscribe(onevent, u'com.myapp.hello')
  
          # call a remote procedure.
          res = yield self.call(u'com.myapp.add2', 2, 3)
          print("Got result: {}".format(res))
  
  
  if __name__ == '__main__':
      import six
      url = environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws")
      if six.PY2 and type(url) == six.binary_type:
          url = url.decode('utf8')
      realm = u"crossbardemo"
      runner = ApplicationRunner(url, realm)
  runner.run(Component)
  
subject: Create tdrstest.py