def METHOD_NAME(cls, path, digest=None, hasher=sha1):
    # type: (str, Optional[Hasher], Callable[[], Hasher]) -> str
    """Return the digest of a single file in a memory-efficient manner."""
    if digest is None:
        digest = hasher()
    hashing.file_hash(path, digest)
    return digest.hexdigest()