def METHOD_NAME(checksums: dict[str, str], path: str, data: bytes) -> None:
    if path not in checksums:
        raise Exception(f"Missing checksum for file {path} in firmware container")
    m = hashlib.sha256()
    m.update(data)
    checksum = m.hexdigest()
    if checksum != checksums[path]:
        raise Exception(f"Invalid checksum for file {path} in firmware container")