(internal) generates imports, code and runtime calls to save a pipeline.

def _code(self):
        """
        (internal) generates imports, code and runtime calls to save a pipeline.
        
        """
        icode, tcode = '', '' # imports, task code
        icall, pcall = '', '' # imap calls, piper calls
        tdone, idone = [], [] # task done, imap done

        for piper in self:
            p = piper
            w = piper.worker
            i = piper.imap
            in_ = i.name if hasattr(i, 'name') else False
            if in_ and in_ not in idone:
                icall += I_SIG % (in_, i.worker_type, i.worker_num, i.stride, \
                                  i.buffer, i.ordered, i.skip, in_)
                idone.append(in_)
            ws = W_SIG % (",".join([t.__name__ for t in w.task]), w.args, w.kwargs)
            pcall += P_SIG % (p.name, ws, in_, p.consume, p.produce, p.spawn, \
                              p.timeout, p.branch, p.debug, p.name, p.track)
            for t in w.task:
                if (t in tdone) or not t:
                    continue
                tm, tn = t.__module__, t.__name__
                if (tm == '__builtin__') or hasattr(p, tn):
                    continue
                if tm == '__main__' or tm == self.filename:
                    tcode += getsource(t)
                else:
                    icode += 'from %s import %s\n' % (tm, tn)
                tdone.append(t)

        pipers = [p.name for p in self]
        pipers = '[%s]' % ", ".join(pipers)
        pipes = [L_SIG % (d.name, s.name) for s, d in self.edges()]
        pipes = '[%s]' % ", ".join(pipes)                           # pipes
        xtras = [str(self[p].xtra) for p in self]
        xtras = '[%s]' % ",".join(xtras)                            # node xtra
        return (icode, tcode, icall, pcall, pipers, xtras, pipes)