code: def load_acm_raw(remove_self_loop):
      assert not remove_self_loop
      filename = "ACM.mat"
      url = "dataset/" + filename
      data_path = get_download_dir() + "/" + filename
      if osp.exists(data_path):
          print(f"Using existing file {filename}", file=sys.stderr)
      else:
          download(_get_dgl_url(url), path=data_path)
  
      data = sio.loadmat(data_path)
      p_vs_l = data["PvsL"]  # paper-field?
      p_vs_a = data["PvsA"]  # paper-author
      p_vs_t = data["PvsT"]  # paper-term, bag of words
      p_vs_c = data["PvsC"]  # paper-conference, labels come from that
  
      # We assign
      # (1) KDD papers as class 0 (data mining),
      # (2) SIGMOD and VLDB papers as class 1 (database),
      # (3) SIGCOMM and MOBICOMM papers as class 2 (communication)
      conf_ids = [0, 1, 9, 10, 13]
      label_ids = [0, 1, 2, 2, 1]
  
      p_vs_c_filter = p_vs_c[:, conf_ids]
      p_selected = (p_vs_c_filter.sum(1) != 0).A1.nonzero()[0]
      p_vs_l = p_vs_l[p_selected]
      p_vs_a = p_vs_a[p_selected]
      p_vs_t = p_vs_t[p_selected]
      p_vs_c = p_vs_c[p_selected]
  
      hg = dgl.heterograph(
          {
              ("paper", "pa", "author"): p_vs_a.nonzero(),
              ("author", "ap", "paper"): p_vs_a.transpose().nonzero(),
              ("paper", "pf", "field"): p_vs_l.nonzero(),
              ("field", "fp", "paper"): p_vs_l.transpose().nonzero(),
          }
      )
  
      features = torch.FloatTensor(p_vs_t.toarray())
  
      pc_p, pc_c = p_vs_c.nonzero()
      labels = np.zeros(len(p_selected), dtype=np.int64)
      for conf_id, label_id in zip(conf_ids, label_ids):
          labels[pc_p[pc_c == conf_id]] = label_id
      labels = torch.LongTensor(labels)
  
      num_classes = 3
  
      float_mask = np.zeros(len(pc_p))
      for conf_id in conf_ids:
          pc_c_mask = pc_c == conf_id
          float_mask[pc_c_mask] = np.random.permutation(
              np.linspace(0, 1, pc_c_mask.sum())
          )
      train_idx = np.where(float_mask <= 0.2)[0]
      val_idx = np.where((float_mask > 0.2) & (float_mask <= 0.3))[0]
      test_idx = np.where(float_mask > 0.3)[0]
  
      num_nodes = hg.number_of_nodes("paper")
      train_mask = get_binary_mask(num_nodes, train_idx)
      val_mask = get_binary_mask(num_nodes, val_idx)
      test_mask = get_binary_mask(num_nodes, test_idx)
  
      return (
          hg,
          features,
          labels,
          num_classes,
          train_idx,
          val_idx,
          test_idx,
          train_mask,
          val_mask,
          test_mask,
      )
  
imports: import sys
  import datetime
  import dgl
  import errno
  import numpy
  import os
  import pickle
  import random
  import torch
  from dgl.data.utils import download, get_download_dir, _get_dgl_url
  import os.path
  from pprint import pprint
  from scipy import sparse
  from scipy import io
label_desc: Use image node_id 9 for calling a global function with example usage: load_acm_raw(remove__loop) and returns: hg,  features,  labels,  num_classes,  train_idx,  val_idx,  test_idx,  train_mask,  val_mask,  test_mask