def __eq__(self, other):
    if isinstance(other, self.__class__):
        return (self._handle == other._handle)
    else:
        return NotImplemented
def __eq__(self, other):
    if isinstance(other, self.__class__):
        return (self._handle == other._handle)
    else:
        return NotImplemented