def METHOD_NAME(module, run_config):
    if run_config == 'none':
        return None
    if run_config == '*':
        attr_name = 'default'
    else:
        attr_name = run_config
    if hasattr(module, attr_name):
        return getattr(module, attr_name)
    elif run_config != '*':
        raise Exception("Attribute %s not set in module %s" % (attr_name, module.name))