def retry_throttled(exception):
    """
    Determines if this exception is due to throttling
    :param exception:
    :return:
    """

    # Log details about the exception
    try:
        raise exception
    except Exception as e:
        current_app.logger.error("ELB retry_throttled triggered", exc_info=True)
        metrics.send("elb_retry", "counter", 1, metric_tags={"exception": str(e)})
        capture_exception()

    if isinstance(exception, botocore.exceptions.ClientError):
        if exception.response["Error"]["Code"] == "LoadBalancerNotFound":
            return False

        if exception.response["Error"]["Code"] == "CertificateNotFound":
            return False
    return True

    Determines if this exception is due to throttling
    :param exception:
    :return:
    
lemur/plugins/lemur_aws/elb.py