def __init__(self):
    self.rank = len(Version._rank_ordering) + 1 + Version._DELETED_MIGRATOR_COUNT
    if Version._rank_ordering:
      assert self.rank > Version._rank_ordering[-1], \
          'rank is out of order (! %d > %d)' % (self.rank, Version._rank_ordering[-1])
    assert self.__class__ not in Version._version_classes, \
        'class %s has already been added to version set' % self.__class__.__name__
    Version._rank_ordering.append(self.rank)
    Version._version_classes.add(self.__class__)
dataset/ETHPy150Open viewfinderco/viewfinder/backend/db/versions.py/Version.__init__/original