def METHOD_NAME(
    package: Package, spdx_version: str, document: Document
) -> List[ValidationMessage]:
    validation_messages: List[ValidationMessage] = []
    context = ValidationContext(
        spdx_id=package.spdx_id,
        parent_id=document.creation_info.spdx_id,
        element_type=SpdxElementType.PACKAGE,
        full_element=package,
    )
    for message in validate_spdx_id(package.spdx_id, document):
        validation_messages.append(ValidationMessage(message, context))
    if not package.files_analyzed:
        package_contains_relationships = filter_by_type_and_origin(
            document.relationships, RelationshipType.CONTAINS, package.spdx_id
        )
        package_contains_file_relationships = [
            relationship
            for relationship in package_contains_relationships
            if get_element_type_from_spdx_id(relationship.related_spdx_element_id, document) == File
        ]
        contained_in_package_relationships = filter_by_type_and_target(
            document.relationships, RelationshipType.CONTAINED_BY, package.spdx_id
        )
        file_contained_in_package_relationships = [
            relationship
            for relationship in contained_in_package_relationships
            if get_element_type_from_spdx_id(relationship.spdx_element_id, document) == File
        ]
        combined_relationships: List[Relationship] = (
            package_contains_file_relationships + file_contained_in_package_relationships
        )
        if combined_relationships:
            validation_messages.append(
                ValidationMessage(
                    f"package must contain no elements if files_analyzed is False, but found {combined_relationships}",
                    context,
                )
            )
    validation_messages.extend(validate_license_expression(package.license_concluded, document, package.spdx_id))
    license_info_from_files = package.license_info_from_files
    if license_info_from_files:
        if not package.files_analyzed:
            validation_messages.append(
                ValidationMessage(
                    f"license_info_from_files must be None if files_analyzed is False, but is: "
                    f"{license_info_from_files}",
                    context,
                )
            )
        else:
            validation_messages.extend(
                validate_license_expressions(license_info_from_files, document, package.spdx_id)
            )
    validation_messages.extend(validate_license_expression(package.license_declared, document, package.spdx_id))
    validation_messages.extend(validate_package(package, spdx_version, context))
    return validation_messages