def warn_if_detached(func):
@wraps(func)<EOL>def wrapped(this, *args, **kwargs):<EOL><INDENT>if '<STR_LIT>' in this.__dict__ and this._detached:<EOL><INDENT>warnings.warn('<STR_LIT>')<EOL><DEDENT>return func(this, *args, **kwargs)<EOL><DEDENT>return wrapped<EOL>
Warn if self / cls is detached.