Packs pipeline commands into bytes.

def pack_pipeline(self, commands):
        '''Packs pipeline commands into bytes.'''
        return b''.join(
            starmap(lambda *args: b''.join(self._pack_command(args)),
                    (a for a, _ in commands)))