def _merge(a, b):
    """
        Return the merge of two dictionaries.

        :param dict a: dictionary to merge into
        :param dict b: dictionary to merge

        :rtype: dict
    """

    if b is None:
        return a

    if isinstance(a, dict):
        for key in b:
            if key in a:
                a[key] = _merge(a[key], b[key])
            else:
                a[key] = b[key]
    else:
        a = b

    return a