I think Marker, build_async_tree and make_markers_for_asyncs don't really belong in the ndb module and the Marker.persist should implement ndb as a strategy based on a configuration.