code: def replace_vertex_references(self, mask):
          
          for entity in self.entities:
              entity.points = mask[entity.points]
docs: Replace the vertex index references in every entity.
  
          Parameters
          ------------
          mask : (len(self.vertices), ) int
            Contains new vertex indexes
  
          Alters
          ------------
          entity.points in self.entities
            Replaced by mask[entity.points]