@staticmethod
def merge_entities(name, ent1, ent2):
    """
        Merge two entities making sure they do not conflict. 

        Parameters
        ----------
        name : hashable

        ent1 : Entity
            First entity to have elements and properties added to new
            entity

        ent2 : Entity
            elements of ent2 will be checked against ent1.complete_registry()
            and only nonexisting elements will be added using add() method.
            Properties of ent2 will update properties of ent1 in new entity.

        Returns
        -------
        a new entity : Entity

        """
    newent = ent1.clone(name)
    newent.add_elements_from(ent2.elements.values())
    for k, v in ent2.properties.items():
        newent.__setattr__(k, v)
    return newent
