def METHOD_NAME(a, b):
    if type(a) != type(b):
        raise Exception('Cannot merge disparate types')
    if type(a) == list:
        return a + b
    if type(a) == dict:
        merged = {}
        for key in a:
            if key in b:
                merged[key] = METHOD_NAME(a[key], b[key])
            else:
                merged[key] = a[key]
        for key in b:
            if not key in a:
                merged[key] = b[key]
        return merged
    raise Exception('Cannot merge {} type'.format(type(a).__name__))