def requireUpgrade(obj):
    """Require that a Versioned instance be upgraded completely first.
    """
    objID = id(obj)
    if objID in versionedsToUpgrade and objID not in upgraded:
        upgraded[objID] = 1
        obj.versionUpgrade()
        return obj
Require that a Versioned instance be upgraded completely first.
    
stackoverflow/venv/lib/python3.6/site-packages/twisted/persisted/styles.py