def METHOD_NAME(self, val):
    """Remove an element. If not a member, raise a KeyError."""
    try:
        del self._data[id(val)]
    except KeyError:
        raise KeyError("Component with id '%s': %s" % (id(val), str(val)))