def __new__(cls, name, bases, attrs, **kwargs):
tasks = {'<STR_LIT>': set()}<EOL>for base in bases:<EOL><INDENT>if hasattr(base, '<STR_LIT>'):<EOL><INDENT>for key, value in base._tasks.items():<EOL><INDENT>tasks[key] |= value<EOL><DEDENT><DEDENT><DEDENT>for attr in attrs.values():<EOL><INDENT>if isinstance(attr, task):<EOL><INDENT>tasks['<STR_LIT>'].add(attr)<EOL><DEDENT><DEDENT>attrs['<STR_LIT>'] = tasks<EOL>attrs['<STR_LIT>'] = EventStreams()<EOL>return super().__new__(cls, name, bases, attrs)<EOL>
put the :class:`~peony.commands.tasks.Task`s in the right place