def add_to_message(data, indent_level=0) -> list:
    """Adds data to the message object"""
    message = []

    if isinstance(data, str):
        message.append(indent(
            dedent(data.strip('\n')).strip(),
            indent_level * '  '
        ))
        return message

    for line in data:
        offset = 0 if isinstance(line, str) else 1
        message += add_to_message(line, indent_level + offset)
    return message
Adds data to the message object