code: def graph_cuts(graph: nx.Graph) -> np.ndarray:
      
  
      N = len(graph)
      diag_hamiltonian = np.zeros(shape=([2]*N), dtype=np.double)
      for q0, q1 in graph.edges():
          for index, _ in np.ndenumerate(diag_hamiltonian):
              if index[q0] != index[q1]:
                  weight = graph[q0][q1].get('weight', 1)
                  diag_hamiltonian[index] += weight
  
      return diag_hamiltonian
docs: For the given graph, return the cut value for all binary assignments
      of the graph.