code: def save_data_dict(model, data, split_idx, save_file):
      data_dict = {}
      train_idx, valid_idx, test_idx = (
          split_idx["train"],
          split_idx["valid"],
          split_idx["test"],
      )
      all_idx = torch.cat([train_idx, valid_idx, test_idx])
      mapped_train_idx = torch.arange(len(train_idx))
      mapped_valid_idx = torch.arange(
          len(train_idx), len(train_idx) + len(valid_idx)
      )
      mapped_test_idx = torch.arange(
          len(train_idx) + len(valid_idx),
          len(train_idx) + len(valid_idx) + len(test_idx),
      )
  
      data_dict["node2vec_embedding"] = model.embedding.weight.data[
          all_idx
      ].cpu()
      data_dict["node_feat"] = data.x.data[all_idx]
      data_dict["label"] = data.y.data[all_idx].to(torch.long)
  
      data_dict["split_idx"] = {
          "train": mapped_train_idx,
          "valid": mapped_valid_idx,
          "test": mapped_test_idx,
      }
  
      print(data_dict)
  
      torch.save(data_dict, save_file)
  
file_path: ogb/examples/nodeproppred/papers100M/node2vec.py
imports: import argparse
  import torch
  from torch_geometric.nn import Node2Vec
  from torch_geometric.utils import to_undirected, dropout_edge
  from tqdm.auto import tqdm
  from ogb.nodeproppred import PygNodePropPredDataset
label_desc: Use image node_id 1 for calling a global function with example usage: save_data_dict(model, data, split_idx, save_file) without return types