code: def train_step(inputs):
      with tf.GradientTape() as tape:
          _, S_pool = model(inputs, training=True)
          loss = sum(model.losses)
      gradients = tape.gradient(loss, model.trainable_variables)
      opt.apply_gradients(zip(gradients, model.trainable_variables))
      return model.losses[0], model.losses[1], S_pool
  
file_path: spektral/examples/other/node_clustering_mincut.py
imports: import matplotlib.pyplot
  import numpy
  import tensorflow
  from sklearn.metrics.cluster import completeness_score, homogeneity_score, v_measure_score
  from tensorflow.keras.layers import Input
  from tensorflow.keras.models import Model
  from tqdm import tqdm
  from spektral.datasets.citation import Cora
  from spektral.layers.convolutional import GCSConv
  from spektral.layers.pooling import MinCutPool
  from spektral.utils.convolution import normalized_adjacency
  from spektral.utils.sparse import sp_matrix_to_sp_tensor
label_desc: Use image node_id 1 for calling a global function with example usage: train_step(inputs) and returns: model,  model,  S_pool