code: def get_user_info(self, token):
          
  
          url = self.get_user_info_url()
  
          try:
              headers = {'Authorization': 'Bearer {}'.format(token)}
              response = requests.get(url, headers=headers)
          except requests.RequestException:
              logger.exception('Failed to retrieve user info due to a request exception.')
              raise UserInfoRetrievalFailed
  
          if response.status_code == 200:
              return self.process_user_info_response(response.json())
          else:
              msg = 'Failed to retrieve user info. Server [{server}] responded with status [{status}].'.format(
                  server=url,
                  status=response.status_code
              )
              raise UserInfoRetrievalFailed(msg)
docs: Retrieves the user info from the OAuth provider.
  
          Arguments:
              token (str): OAuth2 access token.
  
          Returns:
              dict
  
          Raises:
              UserInfoRetrievalFailed: Retrieval of user info from the remote server failed.