code: def new_vertex(self):
      
      vertex = Vertex(len(self.vertices))
      self.vertices.append(vertex)
      return vertex
docs: Creates and returns a new vertex.
  
      Returns:
        A new Vertex instance with a unique index.