<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def remove_unreferenced_vertices(self):
 """ Remove all vertices in the current mesh which are not referenced by a face. """

        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)