def merge(dicto, other):
if not isinstance(dicto, Dicto):<EOL><INDENT>dicto = Dicto(dicto)<EOL><DEDENT>if not isinstance(other, Dicto):<EOL><INDENT>other = Dicto(other)<EOL><DEDENT>for k, v in other.__dict__.items():<EOL><INDENT>if k in dicto and isinstance(dicto[k], Dicto) and isinstance(other[k], Dicto):<EOL><INDENT>dicto[k] = merge(dicto[k], other[k])<EOL><DEDENT>else:<EOL><INDENT>dicto[k] = other[k]<EOL><DEDENT><DEDENT>return dicto<EOL>
Recursive dict merge. Inspired by :meth:``dict.update()``, instead of
    updating only top-level keys, dict_merge recurses down into dicts nested
    to an arbitrary depth, updating keys. The ``other`` is merged into
    ``dicto``.
    :param dicto: dict onto which the merge is executed
    :param other: dict that is going to merged into dicto
    :return: None