'Compare two entities of the same class for equality.'

def __eq__(self, other):

    if (other.__class__ is not self.__class__):
        return NotImplemented
    if (self._key != other._key):
        return False
    return self._equivalent(other)
