code: def check_auth():
      
      if get_oauth_token():
          auth_info = get_auth_info()
          if not auth_info:
              raise MissingTokenInfoException("Could not get token info")
          if datetime.now() >= auth_info['expires_at']:
              msg = (
                  'Token is expired. Now %s but valid until %s',
                  datetime.now(), auth_info['expires_at']
              )
  
              log.warn(
                  msg[0], *msg[1:]
              )
              raise TokenIsExpired(msg[0] % msg[1:])
      else:
          raise MissingTokenException()
docs: Check are we authorised
      :return: True if we authorised
          False if no auth provided
          exception if provided auth is wrong