def build_split_list(self, expr):
        if isinstance(expr, str):
            expr = expr.split(',')
            expr.sort()
        new_list = []
        running_total = 0
        position = 0
        for range in expr:
            running_total += len(range) + 1
            if running_total > self.max_char:
                running_total = 0
                position += 1
            try:
                new_list[position].append(range)
            except (AttributeError, IndexError):
                new_list.append([range,])

        return new_list
Take the max_char function and break up an expression list based on
dataset/ETHPy150Open linkedin/sysops-api/seco/range/__init__.py/Range.build_split_list