def __injectedgetattr__(self, name):
    """
    A getattr method to cause a class to be refreshed.
    """
    if name == '__del__':
        raise AttributeError("Without this, Python segfaults.")
    updateInstance(self)
    log.msg("(rebuilding stale {} instance ({}))".format(
            reflect.qual(self.__class__), name))
    result = getattr(self, name)
    return result

    A getattr method to cause a class to be refreshed.
    
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/rebuild.py