def _code(self):
icode, tcode = '<STR_LIT>', '<STR_LIT>' <EOL>icall, pcall = '<STR_LIT>', '<STR_LIT>' <EOL>tdone, idone = [], [] <EOL>for piper in self:<EOL><INDENT>p = piper<EOL>w = piper.worker<EOL>i = piper.imap<EOL>in_ = i.name if hasattr(i, '<STR_LIT:name>') else False<EOL>if in_ and in_ not in idone:<EOL><INDENT>icall += I_SIG % (in_, i.worker_type, i.worker_num, i.stride,i.buffer, i.ordered, i.skip, in_)<EOL>idone.append(in_)<EOL><DEDENT>ws = W_SIG % ("<STR_LIT:U+002C>".join([t.__name__ for t in w.task]), w.args, w.kwargs)<EOL>pcall += P_SIG % (p.name, ws, in_, p.consume, p.produce, p.spawn,p.timeout, p.branch, p.debug, p.name, p.track)<EOL>for t in w.task:<EOL><INDENT>if (t in tdone) or not t:<EOL><INDENT>continue<EOL><DEDENT>tm, tn = t.__module__, t.__name__<EOL>if (tm == '<STR_LIT>') or hasattr(p, tn):<EOL><INDENT>continue<EOL><DEDENT>if tm == '<STR_LIT:__main__>' or tm == self.filename:<EOL><INDENT>tcode += getsource(t)<EOL><DEDENT>else:<EOL><INDENT>icode += '<STR_LIT>' % (tm, tn)<EOL><DEDENT>tdone.append(t)<EOL><DEDENT><DEDENT>pipers = [p.name for p in self]<EOL>pipers = '<STR_LIT>' % "<STR_LIT:U+002CU+0020>".join(pipers)<EOL>pipes = [L_SIG % (d.name, s.name) for s, d in self.edges()]<EOL>pipes = '<STR_LIT>' % "<STR_LIT:U+002CU+0020>".join(pipes)                           <EOL>xtras = [str(self[p].xtra) for p in self]<EOL>xtras = '<STR_LIT>' % "<STR_LIT:U+002C>".join(xtras)                            <EOL>return (icode, tcode, icall, pcall, pipers, xtras, pipes)<EOL>
(internal) generates imports, code and runtime calls to save a pipeline.