def METHOD_NAME(list1, list2):
    """Merges two lists handling embedded dictionaries via 'name' as a key
    In a case of simple type values are appended.
    Args:
      list1, list2 - list to merge
    Returns merged list
    """
    for v2 in reversed(list2):
        if isinstance(v2, Descriptor):
            if v2 in list1:
                v1 = list1.pop(list1.index(v2))
                list1.insert(0, v1.merge(v2))
            else:
                list1.insert(0, v2)
        elif isinstance(v2, list):
            raise CekitError("Cannot merge list of lists")
        else:
            if v2 not in list1:
                list1.insert(0, v2)
    return list1