<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def action(act, config):
 """ CLI action preprocessor """

    if not config:
        pass
    elif act is "list":
        do_list()
    else:
        config_dir = os.path.join(CONFIG_ROOT, config)
        globals()["do_" + act](config, config_dir)