code: def refresh_grant(request, token_uri, refresh_token, client_id, client_secret):
      
      body = {
          'grant_type': _REFRESH_GRANT_TYPE,
          'client_id': client_id,
          'client_secret': client_secret,
          'refresh_token': refresh_token,
      }
  
      response_data = _token_endpoint_request(request, token_uri, body)
  
      try:
          access_token = response_data['access_token']
      except KeyError as caught_exc:
          new_exc = exceptions.RefreshError(
              'No access token in response.', response_data)
          six.raise_from(new_exc, caught_exc)
  
      refresh_token = response_data.get('refresh_token', refresh_token)
      expiry = _parse_expiry(response_data)
  
      return access_token, refresh_token, expiry, response_data
docs: Implements the OAuth 2.0 refresh token grant.
  
      For more details, see `rfc678 section 6`_.
  
      Args:
          request (google.auth.transport.Request): A callable used to make
              HTTP requests.
          token_uri (str): The OAuth 2.0 authorizations server's token endpoint
              URI.
          refresh_token (str): The refresh token to use to get a new access
              token.
          client_id (str): The OAuth 2.0 application's client ID.
          client_secret (str): The Oauth 2.0 appliaction's client secret.
  
      Returns:
          Tuple[str, Optional[str], Optional[datetime], Mapping[str, str]]: The
              access token, new refresh token, expiration, and additional data
              returned by the token endpoint.
  
      Raises:
          google.auth.exceptions.RefreshError: If the token endpoint returned
              an error.
  
      .. _rfc6748 section 6: https://tools.ietf.org/html/rfc6749#section-6