code: def to_json(self):
          
          return {
              'tpm': self.tpm,
              'cm': self.cm,
              'size': self.size,
              'node_labels': self.node_labels
          }
docs: Return a JSON-serializable representation.