def _join_factory(cls, gap, pad):
if issubclass(cls, dict):<EOL><INDENT>def _join(data):<EOL><INDENT>out = cls()<EOL>data = list(data)<EOL>while data:<EOL><INDENT>tsd = data.pop(<NUM_LIT:0>)<EOL>out.append(tsd, gap=gap, pad=pad)<EOL>del tsd<EOL><DEDENT>return out<EOL><DEDENT><DEDENT>else:<EOL><INDENT>from .. import TimeSeriesBaseList<EOL>def _join(arrays):<EOL><INDENT>list_ = TimeSeriesBaseList(*arrays)<EOL>return list_.join(pad=pad, gap=gap)<EOL><DEDENT><DEDENT>return _join<EOL>
Build a joiner for the given cls, and the given padding options