code: def remove_unreferenced_vertices(self):
          
          referenced = np.zeros(len(self.vertices), dtype=np.bool)
          referenced[self.faces] = True
  
          inverse = np.zeros(len(self.vertices), dtype=np.int64)
          inverse[referenced] = np.arange(referenced.sum())
  
          self.update_vertices(mask=referenced, inverse=inverse)
docs: Remove all vertices in the current mesh which are not
          referenced by a face.