def METHOD_NAME(self):
    """Acquire or refresh a JSON Web Token."""
    if not self.token or self.is_expired:
        self.login()
    elif self.time_remaining < self.refresh_window:
        self.refresh()