code: def load_nowplaying_rs():
      import torchtext.legacy as torchtext
  
      # follow examples/pytorch/pinsage/README to create train_g.bin
      name = "train_g.bin"
      dataset_dir = os.path.join(os.getcwd(), "dataset")
      os.symlink("/tmp/dataset/", dataset_dir)
  
      dataset_path = os.path.join(dataset_dir, "nowplaying_rs", name)
      g_list, _ = dgl.load_graphs(dataset_path)
      g = g_list[0]
      user_ntype = "user"
      item_ntype = "track"
  
      # Assign user and movie IDs and use them as features (to learn an individual trainable
      # embedding for each entity)
      g.nodes[user_ntype].data["id"] = torch.arange(
          g.num_nodes(user_ntype)
      )
      g.nodes[item_ntype].data["id"] = torch.arange(
          g.num_nodes(item_ntype)
      )
  
      # Prepare torchtext dataset and vocabulary
      fields = {}
      examples = []
      for i in range(g.num_nodes(item_ntype)):
          example = torchtext.data.Example.fromlist([], [])
          examples.append(example)
      textset = torchtext.data.Dataset(examples, fields)
  
      return PinsageDataset(g, user_ntype, item_ntype, textset)
  
imports: import inspect
  import json
  import os
  import pickle
  import shutil
  import time
  import zipfile
  from functools import partial, reduce, wraps
  from timeit import default_timer
  import dgl
  import numpy
  import pandas
  import requests
  import torch
  from ogb.nodeproppred import DglNodePropPredDataset
  import traceback
  from _thread import start_new_thread
  import torch.multiprocessing
label_desc: Use image node_id 9 for calling a global function with example usage: load_nowplaying_rs() and returns: PinsageDataset