code: def cut_matrix(self, n):
          
          return connectivity.relevant_connections(n, self.from_nodes,
                                                   self.to_nodes)
docs: Compute the cut matrix for this cut.
  
          The cut matrix is a square matrix which represents connections severed
          by the cut.
  
          Args:
             n (int): The size of the network.
  
          Example:
              >>> cut = Cut((1,), (2,))
              >>> cut.cut_matrix(3)
              array([[0., 0., 0.],
                     [0., 0., 1.],
                     [0., 0., 0.]])