transformation/custom: Migrate code