<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _split(self, iterator, tmp_dir):
 """ Splits the file into several chunks. If the original file is too big to fit in the allocated space, the sorting will be split into several chunks, then merged. :param tmp_dir: Where to put the intermediate sorted results. :param orig_lines: The lines read before running out of space. :return: The names of the intermediate files. """

        fnames = []
        for i, lines in enumerate(iterator):
            lines = list(lines)
            out_fname = os.path.join(tmp_dir, self.TMP_FNAME.format(i + 1))
            self._write(lines, out_fname)
            fnames.append(out_fname)
            if len(lines) < self.max_lines:
                break
        return fnames