def METHOD_NAME(uploaded_file):
    if uploaded_file.content_type not in ALLOWED_MIME_TYPES:
        raise ValidationError(
            pgettext(
                "avatar upload mimetype validator",
                "Uploaded file type is not allowed.",
            )
        )