def _get_preprocessor_loader(plugin_name):
    # NOTE(stpierre): This technically doesn't work, because
    # ResourceType subclasses aren't plugins (yet)
    def transform(cls, *args, **kwargs):
        plug = ResourceType.get(plugin_name)
        return plug.transform(*args, **kwargs)

    return type("PluginLoader_%s" % plugin_name,
                (object,),
                {"transform": classmethod(transform)})
Get a class that loads a preprocessor class.
dataset/ETHPy150Open openstack/rally/rally/task/types.py/_get_preprocessor_loader