'Slice input_items and call map_fn over every slice
This exists because of "errno: Argument list too long"'

def _sliced_op(self, input_items, map_fn):

    max_arg_len = ((32 * 4) * 1024)
    avg_filename_len = 300
    size = (max_arg_len // avg_filename_len)
    status = 0
    outs = []
    errs = []
    items = copy.copy(input_items)
    while items:
        (stat, out, err) = map_fn(items[:size])
        status = max(stat, status)
        outs.append(out)
        errs.append(err)
        items = items[size:]
    return (status, u'\n'.join(outs), u'\n'.join(errs))
