def METHOD_NAME(cls, cfg, session):
    # Make sure that we are the base-class!
    if cls != AgentExecutingComponent:
        raise TypeError('Factory only available to base class!')
    name = cfg['spawner']
    from .popen    import Popen
    from .flux     import Flux
    from .sleep    import Sleep
    impl = {
        EXECUTING_NAME_POPEN  : Popen,
        EXECUTING_NAME_FLUX   : Flux,
        EXECUTING_NAME_SLEEP  : Sleep,
    }
    if name not in impl:
        raise ValueError('AgentExecutingComponent %s unknown' % name)
    return impl[name](cfg, session)