def get_rates_from_response_headers(headers):
    """
    Returns a namedtuple with values for short - and long usage and limit rates found in provided HTTP response headers
    :param headers: HTTP response headers
    :type headers: dict
    :return: namedtuple with request rates or None if no rate-limit headers present in response.
    :rtype: Optional[RequestRate]
    """
    try:
        usage_rates = [int(v) for v in headers['X-RateLimit-Usage'].split(',')]
        limit_rates = [int(v) for v in headers['X-RateLimit-Limit'].split(',')]

        return RequestRate(short_usage=usage_rates[0], long_usage=usage_rates[1],
                           short_limit=limit_rates[0], long_limit=limit_rates[1])
    except KeyError:
        return None
Returns a namedtuple with values for short - and long usage and limit rates found in provided HTTP response headers
    :param headers: HTTP response headers
    :type headers: dict
    :return: namedtuple with request rates or None if no rate-limit headers present in response.
    :rtype: Optional[RequestRate]