def build_split_list(self, expr):
        '''
        Take the max_char function and break up an expression list based on
        the character limits of individual items
        '''
        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, __HOLE__):
                new_list.append([range,])

        return new_list
dataset/ETHPy150Open linkedin/sysops-api/seco/range/__init__.py/Range.build_split_list