def validate_bagit_file(bagit_path):
    """Check if a BagIt file is valid.

    Raises:
        ServiceFailure
            If the BagIt zip archive file fails any of the following checks:

            - Is a valid zip file.
            - The tag and manifest files are correctly formatted.
            - Contains all the files listed in the manifests.
            - The file checksums match the manifests.

    """
    _assert_zip_file(bagit_path)
    bagit_zip = zipfile.ZipFile(bagit_path)
    manifest_info_list = _get_manifest_info_list(bagit_zip)
    _validate_checksums(bagit_zip, manifest_info_list)
    return True
Check if a BagIt file is valid.

    Raises:
        ServiceFailure
            If the BagIt zip archive file fails any of the following checks:

            - Is a valid zip file.
            - The tag and manifest files are correctly formatted.
            - Contains all the files listed in the manifests.
            - The file checksums match the manifests.