def extract_retry(request):
    """extracts the value of the key retry from the dict or returns 0 if Not found
    Args:
        request(dict): required to have
            - method(string): http method to use
            - url(string): url of the requested resource
            - kwargs(dict): defines more specs for the request
                - data(dict): if request has json body
                - headers(dict): if you want to attach any headers to the request
    Returns:
        int: how many times this request was retried
    """
    if not request.get('retries'):
        return 0
    else:
        return request.get('retries')