def METHOD_NAME(user_input, level, devices, message):
    # value is a list --> just unpack all its items
    if isinstance(user_input, (list, tuple)):
        for i in user_input:
            message, devices = METHOD_NAME(i, level, devices, message)
    # value is a dict or our "container" --> unpack to print key-value pairs
    elif isinstance(user_input, (dict, ProxyDataContainer)):
        message += "\n"
        for item in user_input:
            message += "\t" * level
            message += "%s:" % item
            # we don't want to save passphrase to the log
            if item == "passphrase" and user_input[item]:
                value = "*****"
            else:
                value = user_input[item]
            message, devices = METHOD_NAME(value, level + 1, devices, message)
    else:
        # and finally append value to the message
        message += " %s\n" % user_input
        # if value is actually a blivet device, save it for future use
        if isinstance(user_input, StorageDevice):
            devices.append(user_input)
    return (message, devices)