@staticmethod
def multi_line_string(text):
    """
        Lines are joined by a single space unless they end with a backslash.
        Indentation is ignored.
        """
    buf = ''
    has_backslash = True
    for i, line in enumerate(text.split('\n')):
        if i == 0:
            buf += line
        elif has_backslash:
            buf = buf[:-1] + line.lstrip()
        else:
            line = line.lstrip()
            if len(line) > 0:
                buf += f' {line.lstrip()}'
        if len(line) > 0 and line[-1] == '\\':
            has_backslash = True
        else:
            has_backslash = False
    return buf
