def get_callable_for_event(name, event_config, context=None):

    kwargs = {
        'context':  context,
        'key':      name,
        'config':   event_config,
    }

    if "command" in event_config:
        f = partial(do_shell, event_config["command"], **kwargs)
    elif "function" in event_config:
        f = partial(get_callable_from_string(event_config["function"]), **kwargs)
    elif "method" in event_config:
        f = partial(getattr(get_handler_object(event_config['method'][0]), event_config['method'][1]), **kwargs)
    else:
        raise AttributeError("%s have a class, method, function or command" % name)

    return f
Creates a foreign key name from a class name.
dataset/ETHPy150Open nigelkersten/pymacadmin/bin/crankd.py/get_callable_for_event--crossover with--dataset/ETHPy150Open rsms/smisk/lib/smisk/inflection/__init__.py/Inflector.foreignKey