<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_token(self, force=False):
 """ Returns the auth token, if it is valid. If not, calls the auth endpoint to get a new token. Passing 'True' to 'force' forces a call for a new token, even if there already is a valid token. """

        self.authenticated = self._has_valid_token()
        if force or not self.authenticated:
            self.authenticate()
        return self.token