def new_source(self, source):
source_streamlet = None<EOL>if callable(source):<EOL><INDENT>source_streamlet = SupplierStreamlet(source)<EOL><DEDENT>elif isinstance(source, Generator):<EOL><INDENT>source_streamlet = GeneratorStreamlet(source)<EOL><DEDENT>else:<EOL><INDENT>raise RuntimeError("<STR_LIT>")<EOL><DEDENT>self._sources.append(source_streamlet)<EOL>return source_streamlet<EOL>
Adds a new source to the computation DAG