def METHOD_NAME(local_engine_empty, unprivileged_pg_repo):
    # Start with a clean repo -- add a table to output to see if it's preserved.
    head = _setup_dataset()
    local_objects = OUTPUT.objects
    assert len(local_objects.get_downloaded_objects()) == 2
    assert len(local_objects.get_all_objects()) == 2
    assert local_engine_empty.get_all_tables(OUTPUT.to_schema()) == ["test"]
    # Import the 'fruits' table from the origin.
    remote_head = unprivileged_pg_repo.images["latest"]
    import_table_from_remote(
        unprivileged_pg_repo, ["fruits"], remote_head.image_hash, OUTPUT, target_tables=[]
    )
    new_head = OUTPUT.head
    # Check that the table now exists in the output, is committed and there's no trace of the cloned repo.
    # Also clean up the unused objects to make sure that the newly cloned table is still recorded.
    assert sorted(local_engine_empty.get_all_tables(OUTPUT.to_schema())) == ["fruits", "test"]
    local_objects.cleanup()
    assert len(get_current_repositories(local_engine_empty)) == 1
    head.checkout()
    assert local_engine_empty.table_exists(OUTPUT.to_schema(), "test")
    assert not local_engine_empty.table_exists(OUTPUT.to_schema(), "fruits")
    new_head.checkout()
    assert local_engine_empty.table_exists(OUTPUT.to_schema(), "test")
    assert local_engine_empty.table_exists(OUTPUT.to_schema(), "fruits")
    assert OUTPUT.run_sql("SELECT * FROM fruits") == [(1, "apple"), (2, "orange")]