def get_dict_leaves(data):
result = []<EOL>if isinstance(data, dict):<EOL><INDENT>for item in data.values():<EOL><INDENT>result.extend(get_dict_leaves(item))<EOL><DEDENT><DEDENT>elif isinstance(data, list):<EOL><INDENT>result.extend(data)<EOL><DEDENT>else:<EOL><INDENT>result.append(data)<EOL><DEDENT>return result<EOL>
Given a nested dictionary, this returns all its leave elements in a list.

:param adict:

:return: list