code: def train():
      model.train()
      optimizer.zero_grad()
      x = data["movie"].x
      edge_indices = data.edge_index_dict.values()
      pos_hs, neg_hs, summaries = model(x, edge_indices)
      loss = model.loss(pos_hs, neg_hs, summaries)
      loss.backward()
      optimizer.step()
      return float(loss)
  
file_path: pytorch_geometric/examples/hetero/dmgi_unsup.py
imports: import os.path
  import torch
  import torch.nn.functional
  from sklearn.linear_model import LogisticRegression
  from torch.optim import Adam
  import torch_geometric.transforms
  from torch_geometric.datasets import IMDB
  from torch_geometric.nn import GCNConv
label_desc: Use image node_id 1 for calling a global function with example usage: train() and returns: float