def METHOD_NAME(pg_repo_local):
    runner = CliRunner()
    # Uncheckout first
    result = runner.invoke(checkout_c, [str(pg_repo_local), "-u", "-f"])
    assert result.exit_code == 0
    assert pg_repo_local.head is None
    assert not get_engine().schema_exists(str(pg_repo_local))
    result = runner.invoke(checkout_c, [str(pg_repo_local) + ":latest", "-l"])
    assert result.exit_code == 0
    assert pg_repo_local.head is not None
    assert get_engine().schema_exists(str(pg_repo_local))
    assert get_engine().get_table_type(str(pg_repo_local), "fruits") == "VIEW"
    assert get_engine().get_table_type(str(pg_repo_local), WRITE_LOWER_PREFIX + "fruits") in (
        "FOREIGN TABLE",
        "FOREIGN",
    )
    assert (
        get_engine().get_table_type(str(pg_repo_local), WRITE_UPPER_PREFIX + "fruits")
        == "BASE TABLE"
    )