def task(obj = None, deps = None):
<EOL>if callable(obj):<EOL><INDENT>__task(obj.__name__, obj)<EOL>return obj<EOL><DEDENT>def __decorated(func):<EOL><INDENT>__task(obj if obj else obj.__name__, deps, func)<EOL>return func<EOL><DEDENT>return __decorated<EOL>
Decorator for creating a task.