<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def requires_login(func, *args, **kwargs):
 """Decorator to check that the user is logged in. Raises `BetfairError` if instance variable `session_token` is absent. """

    self = args[0]
    if self.session_token:
        return func(*args, **kwargs)
    raise exceptions.NotLoggedIn()