def requireUpgrade(obj):
 objID = id(obj)
 if ((objID in versionedsToUpgrade) and (objID not in upgraded)):
  upgraded[objID] = 1
  obj.versionUpgrade()
  return obj

def requireUpgrade ( obj ) : 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 .