code: def requires_login(func, *args, **kwargs):
      
      self = args[0]
      if self.session_token:
          return func(*args, **kwargs)
      raise exceptions.NotLoggedIn()
docs: Decorator to check that the user is logged in. Raises `BetfairError`
      if instance variable `session_token` is absent.