code: def instrument_versioned_classes(self, mapper, cls):
          
          if hasattr(cls, '__versioned__') and cls not in self.pending_classes:
              self.pending_classes.add(cls)
docs: Collect versioned class and add it to pending_classes list.
  
          :mapper mapper: SQLAlchemy mapper object
          :cls cls: SQLAlchemy declarative class