def get_batch(self, items: list):
    'Return the defined batch of the given items.\n        Items are usually input files.'
    if (len(items) < self.batches):
        raise WorkflowError('Batching rule {} has less input files than batches. Please choose a smaller number of batches.'.format(self.rulename))
    items = sorted(items)
    batch_len = math.floor((len(items) / self.batches))
    idx = (self.idx - 1)
    i = (idx * batch_len)
    if self.is_final:
        return items[i:]
    else:
        return items[i:(i + batch_len)]
Return the defined batch of the given items.
Items are usually input files.
def get_batch(self, items: list):
    'Return the defined batch of the given items.\n        Items are usually input files.'
    if (len(items) < self.batches):
        raise WorkflowError('Batching rule {} has less input files than batches. Please choose a smaller number of batches.'.format(self.rulename))
    items = sorted(items)
    batch_len = math.floor((len(items) / self.batches))
    idx = (self.idx - 1)
    i = (idx * batch_len)
    if self.is_final:
        return items[i:]
    else:
        return items[i:(i + batch_len)]