@staticmethod
def print(key, value):
    """ Return a string which is pretty-printing the key+value """
    if isinstance(value, list):
        s = '%block {}'.format(key)
        has_nl = False
        for v in value:
            if '\n' in v:
                has_nl = True
                break
        if has_nl:
            value[-1].replace('\n', '')
            s += '\n{}'.format(''.join(value))
        else:
            s += '\n{} {}'.format(value[0], '\n'.join(value[1:]))
        s += '%endblock {}'.format(key)
    else:
        s = '{} {}'.format(key, value)
    return s
