def _munch_off_batch(self, queue):
<EOL>if len(queue) == <NUM_LIT:1> or self._num_cpus == <NUM_LIT:1>:<EOL><INDENT>pairs_to_run = [[queue.pop(<NUM_LIT:0>), self._num_cpus]]<EOL><DEDENT>else:<EOL><INDENT>pairs_to_run = []<EOL>while len(queue) > <NUM_LIT:0> and len(pairs_to_run) < self._num_cpus:<EOL><INDENT>pairs_to_run.append([queue.pop(<NUM_LIT:0>), <NUM_LIT:1>])<EOL><DEDENT>num_cpus_left = self._num_cpus - len(pairs_to_run)<EOL>while num_cpus_left > <NUM_LIT:0>:<EOL><INDENT>for i, _ in enumerate(pairs_to_run):<EOL><INDENT>pairs_to_run[i][<NUM_LIT:1>] += <NUM_LIT:1><EOL>num_cpus_left -= <NUM_LIT:1><EOL>if num_cpus_left == <NUM_LIT:0>: break<EOL><DEDENT><DEDENT><DEDENT>return pairs_to_run<EOL>
r"""Take a batch of sequences off the queue, and return pairs_to_run.
        The queue given as a parameter is affected