code: def train():
      model.train()
      optimizer.zero_grad()
      out = model(data.x_dict, data.edge_index_dict)
      mask = data["author"].train_mask
      loss = F.cross_entropy(out[mask], data["author"].y[mask])
      loss.backward()
      optimizer.step()
      return float(loss)
  
file_path: pytorch_geometric/examples/hetero/hetero_conv_dblp.py
imports: import os.path
  import torch
  import torch.nn.functional
  import torch_geometric.transforms
  from torch_geometric.datasets import DBLP
  from torch_geometric.nn import HeteroConv, Linear, SAGEConv
label_desc: Use image node_id 1 for calling a global function with example usage: train() and returns: float