def run(args, features=None):
features = features or []<EOL>for feature in features:<EOL><INDENT>tasks_module = get_task_module(feature)<EOL>if tasks_module:<EOL><INDENT>tasks.superimpose(tasks_module)<EOL><DEDENT><DEDENT>if len(args) < <NUM_LIT:2> or (len(args) == <NUM_LIT:2> and args[<NUM_LIT:1>] == '<STR_LIT>'):<EOL><INDENT>tasks.help()<EOL><DEDENT>else:<EOL><INDENT>taskname = args[<NUM_LIT:1>]<EOL>try:<EOL><INDENT>task = tasks.get_task(taskname, include_helpers=False)<EOL><DEDENT>except TaskNotFound:<EOL><INDENT>print('<STR_LIT>' % taskname)<EOL><DEDENT>else:<EOL><INDENT>remaining_args = args[<NUM_LIT:2>:] if len(args) > <NUM_LIT:2> else []<EOL>invoke_task(task, remaining_args)<EOL><DEDENT><DEDENT>
Run an ape task.

Composes task modules out of the selected features and calls the
task with arguments.

:param args: list comprised of task name followed by arguments
:param features: list of features to compose before invoking the task