def _update_app_log_info(
    review_fetch: list,
    total_downloads: int,
    first_pass: bool = False,
    continuation_token: object = None,
    completed: bool = False,
) -> dict:
    """
    Helper function for `save_playstore_app_list_reviews` that updates the `log_info` dict using data from the other args

    Args:
        review_fetch: list - list of reviews fetched by google-play-store API function
        total_downloads: the total number of reviews downloaded for this app
        first_pass: bool, default False - indicates whether this is the first time the function is being run, in which
        case it should save slightly different data
        continuation_token: object - returned by google-play-store API function
        completed: bool, default False - indicates whether all the reviews have been downloaded; like `first_pass`, this
        affects the data that's saved

    Returns:
        a dict, derived from `log_info`, which has been updated according to the arguments provided

    """

    # set default info
    app_log_info = {
        "completed": False,
        "downloaded": total_downloads,
        "continuation_token": continuation_token,
    }

    if first_pass and len(review_fetch) > 0:
        app_log_info.update(
            {
                "latest_review_id": review_fetch[0]["reviewId"],
                "latest_review_time": review_fetch[0]["at"],
            }
        )

    if completed:
        app_log_info.update({"completed": True})
        app_log_info.pop("continuation_token", None)

    return app_log_info