def METHOD_NAME(openfoam_dict, nbase=0, baseword='name'):
    msg = ''
    space1 = ' ' * nbase
    space2 = ' ' * (nbase + 4)
    msg += '%s{\n' % baseword
    msg += '%s#keys (%s)=%s\n' % (space2, type(openfoam_dict), openfoam_dict.keys())
    for key, value in sorted(openfoam_dict.items()):
        if isinstance(value, str):
            value = value.strip()
        if isinstance(key, str):
            msg += '%s%s : ' % (space2, key)
        else:
            msg += '%s%s (%s) : ' % (space2, key, type(value))
        if isinstance(value, dict):
            value = METHOD_NAME(value, nbase + 4, baseword='')
        msg += '%s\n' % (str(value).strip())
    msg += '%s{\n' % space1
    return msg