from typing import Dict
from typing import Any


def is_acceptable(upload: Dict[str, Any], threshold: float,
                  prev_created_count: int = 0) -> bool:
    """Whether an upload is acceptable

    :param upload: Upload data as a dictionary
    :param threshold: Threshold ratio of errors above which an upload
    is not accepted
    :param prev_created_count: Created count of previous upload

    :return: Whether the upload is acceptable
    """
    created = upload['summary'].get('numCreated', 0)
    updated = upload['summary'].get('numUpdated', 0)
    errors = upload['summary'].get('numError', 0)
    return (
        upload['status'] == "SUCCESS"
        and created > prev_created_count
        and updated == 0  # non-UUID sources should never update a case
        and errors / (errors + created) <= threshold
        and "accepted" not in upload  # skip already accepted cases
    )