code: def load_data(
      dataset, batch_size=128, num_workers=10, root_path="./data"
  ):
      if os.path.exists(
          os.path.join(root_path, dataset + "_train.pkl")
      ):
          g_file = open(
              os.path.join(root_path, dataset + "_hg.pkl"), "rb"
          )
          hg = pkl.load(g_file)
          g_file.close()
          train_set_file = open(
              os.path.join(root_path, dataset + "_train.pkl"), "rb"
          )
          train_set = pkl.load(train_set_file)
          train_set_file.close()
          test_set_file = open(
              os.path.join(root_path, dataset + "_test.pkl"), "rb"
          )
          test_set = pkl.load(test_set_file)
          test_set_file.close()
          eval_set_file = open(
              os.path.join(root_path, dataset + "_eval.pkl"), "rb"
          )
          eval_set = pkl.load(eval_set_file)
          eval_set_file.close()
      else:
          if dataset == "movielens":
              hg, train_set, eval_set, test_set = process_movielens(
                  root_path
              )
          elif dataset == "amazon":
              hg, train_set, eval_set, test_set = process_amazon(
                  root_path
              )
          else:
              print("Available datasets: movielens, amazon.")
              raise NotImplementedError
  
      if dataset == "movielens":
          meta_paths = {
              "user": [["um", "mu"]],
              "movie": [["mu", "um"], ["mg", "gm"]],
          }
          user_key = "user"
          item_key = "movie"
      elif dataset == "amazon":
          meta_paths = {
              "user": [["ui", "iu"]],
              "item": [
                  ["iu", "ui"],
                  ["ic", "ci"],
                  ["ib", "bi"],
                  ["iv", "vi"],
              ],
          }
          user_key = "user"
          item_key = "item"
      else:
          print("Available datasets: movielens, amazon.")
          raise NotImplementedError
  
      train_set = torch.Tensor(train_set).long()
      eval_set = torch.Tensor(eval_set).long()
      test_set = torch.Tensor(test_set).long()
  
      train_set = MyDataset(train_set)
      train_loader = DataLoader(
          dataset=train_set,
          batch_size=batch_size,
          shuffle=True,
          num_workers=num_workers,
      )
      eval_set = MyDataset(eval_set)
      eval_loader = DataLoader(
          dataset=eval_set,
          batch_size=batch_size,
          shuffle=True,
          num_workers=num_workers,
      )
      test_set = MyDataset(test_set)
      test_loader = DataLoader(
          dataset=test_set,
          batch_size=batch_size,
          shuffle=True,
          num_workers=num_workers,
      )
  
      return (
          hg,
          train_loader,
          eval_loader,
          test_loader,
          meta_paths,
          user_key,
          item_key,
      )
  
file_path: dgl/examples/pytorch/TAHIN/data_loader.py
imports: import os
  import pickle
  import random
  import dgl
  import numpy
  import torch
  from torch.utils.data import DataLoader, Dataset
label_desc: Use image node_id 4 for calling a global function with example usage: load_data(dataset, batch_size, num_workers, root_path) and returns: hg,  train_loader,  eval_loader,  test_loader,  meta_paths,  user_key,  item_key