code: def assign_vertexid(self):
          
  
          # gather 'uniq' names which are refferred by blocks
          validvnames = set()
          self.valid_vertices = []
          for b in self.blocks.values():
              for n in b.vnames:
                  v = self.vertices[n]
                  if v.name not in validvnames:
                      validvnames.update([v.name])
                      self.valid_vertices.append(v)
  
          self.valid_vertices = sorted(self.valid_vertices)
          for i, v in enumerate(self.valid_vertices):
              v.index = i
docs: 1. create list of Vertex which are referred by blocks only.
          2. sort vertex according to (x, y, z)
          3. assign sequence number for each Vertex
          4. sorted list is saved as self.valid_vertices