code: def num_graphs(data):
      if hasattr(data, "num_graphs"):
          return data.num_graphs
      else:
          return data.x.size(0)
  
file_path: pytorch_geometric/benchmark/kernel/train_eval.py
imports: import time
  import torch
  import torch.nn.functional
  from sklearn.model_selection import StratifiedKFold
  from torch import tensor
  from torch.optim import Adam
  from torch_geometric.loader import DataLoader
  from torch_geometric.loader import DenseDataLoader
label_desc: Use image node_id 3 for calling a global function with example usage: num_graphs(data) and returns: data, data