def METHOD_NAME(
    package: Package, spdx_version: str, context: Optional[ValidationContext] = None
) -> List[ValidationMessage]:
    validation_messages: List[ValidationMessage] = []
    if not context:
        context = ValidationContext(
            spdx_id=package.spdx_id, element_type=SpdxElementType.PACKAGE, full_element=package
        )
    download_location = package.download_location
    if isinstance(download_location, str):
        for message in validate_download_location(download_location):
            validation_messages.append(ValidationMessage("package download_location " + message, context))
    homepage = package.homepage
    if isinstance(homepage, str):
        for message in validate_url(homepage):
            validation_messages.append(ValidationMessage("homepage " + message, context))
    verification_code = package.verification_code
    if verification_code:
        if not package.files_analyzed:
            validation_messages.append(
                ValidationMessage(
                    f"verification_code must be None if files_analyzed is False, but is: {verification_code}", context
                )
            )
        else:
            validation_messages.extend(validate_verification_code(verification_code, package.spdx_id))
    validation_messages.extend(validate_checksums(package.checksums, package.spdx_id, spdx_version))
    validation_messages.extend(
        validate_external_package_refs(package.external_references, package.spdx_id, spdx_version)
    )
    if spdx_version == "SPDX-2.2":
        if package.primary_package_purpose is not None:
            validation_messages.append(
                ValidationMessage("primary_package_purpose is not supported in SPDX-2.2", context)
            )
        if package.built_date is not None:
            validation_messages.append(ValidationMessage("built_date is not supported in SPDX-2.2", context))
        if package.release_date is not None:
            validation_messages.append(ValidationMessage("release_date is not supported in SPDX-2.2", context))
        if package.valid_until_date is not None:
            validation_messages.append(ValidationMessage("valid_until_date is not supported in SPDX-2.2", context))
        if package.license_concluded is None:
            validation_messages.append(ValidationMessage("license_concluded is mandatory in SPDX-2.2", context))
        if package.license_declared is None:
            validation_messages.append(ValidationMessage("license_declared is mandatory in SPDX-2.2", context))
        if package.copyright_text is None:
            validation_messages.append(ValidationMessage("copyright_text is mandatory in SPDX-2.2", context))
    return validation_messages