def delete(self, instance, disconnect=True):
if instance in self.storage:<EOL><INDENT>self.storage.remove(instance)<EOL><DEDENT>else:<EOL><INDENT>raise DeleteException("<STR_LIT>")<EOL><DEDENT>if not disconnect:<EOL><INDENT>return<EOL><DEDENT>for link in self.links.values():<EOL><INDENT>if instance not in link:<EOL><INDENT>continue<EOL><DEDENT>for other in link[instance]:<EOL><INDENT>unrelate(instance, other, link.rel_id, link.phrase)<EOL><DEDENT><DEDENT>
Delete an *instance* from the instance pool and optionally *disconnect*
it from any links it might be connected to. If the *instance* is not
part of the metaclass, a *MetaException* is thrown.