def _descending(dbus_object):
<EOL>if isinstance(dbus_object, dbus.Dictionary):<EOL><INDENT>key_levels = [_descending(x) for x in dbus_object.keys()]<EOL>value_levels = [_descending(x) for x in dbus_object.values()]<EOL>if any(k is None for k in key_levels) orany(v is None for v in value_levels):<EOL><INDENT>return None<EOL><DEDENT>max_key_level = max(key_levels) if key_levels != [] else <NUM_LIT:0><EOL>max_value_level = max(value_levels) if value_levels != [] else <NUM_LIT:0><EOL>max_level = max(max_key_level, max_value_level)<EOL>variant_level = dbus_object.variant_level<EOL>if variant_level == <NUM_LIT:0>:<EOL><INDENT>return max_level<EOL><DEDENT>return None if variant_level < max_level + <NUM_LIT:1> else variant_level<EOL><DEDENT>if isinstance(dbus_object, (dbus.Array, dbus.Struct)):<EOL><INDENT>levels = [_descending(x) for x in dbus_object]<EOL>if any(l is None for l in levels):<EOL><INDENT>return None<EOL><DEDENT>max_level = max(levels) if levels != [] else <NUM_LIT:0><EOL>variant_level = dbus_object.variant_level<EOL>if variant_level == <NUM_LIT:0>:<EOL><INDENT>return max_level<EOL><DEDENT>return None if variant_level < max_level + <NUM_LIT:1> else variant_level<EOL><DEDENT>return dbus_object.variant_level<EOL>
Verify levels of variant values always descend.

:param object dbus_object: a dbus object
:returns: None if there was a failure of the property, otherwise the level
:rtype: int or NoneType

None is a better choice than False, for 0, a valid variant level, is always
interpreted as False.