code: def login_required(func):
      '''decorator describing User methods that need to be logged in'''
      def ret(obj, *args, **kw):
          if not hasattr(obj, 'sessionToken'):
              message = '%s requires a logged-in session' % func.__name__
              raise ResourceRequestLoginRequired(message)
          return func(obj, *args, **kw)
      return ref login_required(func):
      '''decorator describing User methods that need to be logged in'''
      def ret(obj, *args, **kw):
          if not hasattr(obj, 'sessionToken'):
              message = '%s requires a logged-in session' % func.__name__
              raise ResourceRequestLoginRequired(message)
          return func(obj, *args, **kw)
      return ret
docs: decorator describing User methods that need to be logged in