def unique_filepath(path):
    """Get a unique, absolute filepath from path by appending _%d, where %d is
    a unique digit starting at 1.

    Args:
        path (str): A not necessarily absolute filepath.

    Returns:
        str: A unique, absolute filepath.
    """
    import os
    attempt = 0
    file_path = os.path.splitext(os.path.abspath(path))
    file_name = file_path[0]
    file_ext = file_path[1]
    while True:
        suffix = '_' + str(attempt) if attempt > 0 else ''
        attempt_file_path = file_name + suffix + file_ext
        if not os.path.exists(attempt_file_path):
            return attempt_file_path
        attempt += 1
