def METHOD_NAME(path, hash_type="sha512"):
    """Get the hash of a given path.
    Args:
        path (str): the path to calculate the hash for
        hash_type (str, optional): the algorithm to use.  Defaults to `sha512`
    Returns:
        str: the hexdigest of the hash
    """
    # I'd love to make this async, but evidently file i/o is always ready
    h = hashlib.new(hash_type)
    with open(path, "rb") as f:
        for chunk in iter(functools.partial(f.read, 4096), b""):
            h.update(chunk)
    return h.hexdigest()