def get(self, filter=False):
result = {}<EOL>for k, v in self.elements().items():<EOL><INDENT>intermediate = v.get(filter=filter)<EOL>if intermediate:<EOL><INDENT>result[k] = intermediate<EOL><DEDENT><DEDENT>return result<EOL>
Returns a dictionary with the values of the model. Note that the values
of the leafs are YANG classes.

Args:
    filter (bool): If set to ``True``, show only values that have been set.

Returns:
    dict: A dictionary with the values of the model.

Example:

    >>> pretty_print(config.get(filter=True))
    >>> {
    >>>     "interfaces": {
    >>>         "interface": {
    >>>             "et1": {
    >>>                 "config": {
    >>>                     "description": "My description",
    >>>                     "mtu": 1500
    >>>                 },
    >>>                 "name": "et1"
    >>>             },
    >>>             "et2": {
    >>>                 "config": {
    >>>                     "description": "Another description",
    >>>                     "mtu": 9000
    >>>                 },
    >>>                 "name": "et2"
    >>>             }
    >>>         }
    >>>     }
    >>> }