partially completed migration of tmzAPI to ndb