def METHOD_NAME(self, attr):
    validate_identifier(attr)
    if attr in self:
        obj = super().__getitem__(attr)
        raise NamespaceCollision(f"'{attr}' has already been declared as a {obj}")