<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def apply_cut(self, cm):
 """Return a modified connectivity matrix with all connections that are severed by this cut removed. Args: cm (np.ndarray):
 A connectivity matrix. """

        # Invert the cut matrix, creating a matrix of preserved connections
        inverse = np.logical_not(self.cut_matrix(cm.shape[0])).astype(int)
        return cm * inverse