def service_factory(prefix, base):
    if not prefix:
        return base
    name = prefix.title() + base.__name__
    cls = type(name, (base,), {'name': prefix})
    return cls
Vacuum indexes in datastore.
dataset/ETHPy150Open onefinestay/nameko/test/test_events.py/service_factory--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/tools/appcfg.py/VacuumIndexesOperation.DoVacuum