def _assemble_elements_on_lines(elements, max_line_char, separator=','):
    lines = [""]
    for element in elements:
        if len(lines[-1]) > 1:
            lines[-1] += separator
        new_line_length = len(lines[-1]) + len(element)
        if new_line_length <= max_line_char:
            lines[-1] += element
        else:
            lines.append(element)
    return lines
dataset/ETHPy150Open internap/fake-switches/fake_switches/dell/command_processor/enabled.py/_assemble_elements_on_lines/original