docs: def to_json(self):
          """Return a JSON-serializable representation."""
          return {
              'network': self.network,
              'state': self.state,
              'nodes': self.node_indices,
              'cut': self.cut,
          }