code: def train_step(model, inputs):
      with tf.GradientTape() as tape:
          _ = 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
  
file_path: spektral/examples/other/node_clustering_tvgnn.py
imports: import numpy
  import tensorflow
  from sklearn.metrics.cluster import completeness_score, homogeneity_score, normalized_mutual_info_score
  from tensorflow.keras import Model
  from tqdm import tqdm
  from spektral.datasets import DBLP
  from spektral.datasets.citation import Citation
  from spektral.layers import AsymCheegerCutPool, GTVConv
  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(model, inputs) and returns: model