code: def __init__(self, path: str):
      data_path: str = os.path.join(path, "raw", "ACM.mat")
      _url: str = "https://data.dgl.ai/dataset/ACM.mat"
      if os.path.exists(data_path) and os.path.isfile(data_path):
          print(f"Using cached file {data_path}")
      else:
          dgl.data.utils.download(_url, data_path)
      data = scipy.io.loadmat(data_path)
  
      hg = dgl.heterograph(
          {
              ("paper", "written-by", "author"): data["PvsA"].nonzero(),
              ("author", "writing", "paper"): data["PvsA"]
              .transpose()
              .nonzero(),
              ("paper", "citing", "paper"): data["PvsP"].nonzero(),
              ("paper", "cited", "paper"): data["PvsP"]
              .transpose()
              .nonzero(),
              ("paper", "is-about", "subject"): data["PvsL"].nonzero(),
              ("subject", "has", "paper"): data["PvsL"]
              .transpose()
              .nonzero(),
          }
      )
  
      pvc = data["PvsC"].tocsr()
      p_selected = pvc.tocoo()
      # generate labels
      labels = pvc.indices
      hg.nodes["paper"].data["label"] = torch.tensor(labels).long()
  
      # generate train/val/test split
      pid = p_selected.row
      shuffle = np.random.permutation(pid)
      train_idx = torch.tensor(shuffle[0:800]).long()
      val_idx = torch.tensor(shuffle[800:900]).long()
      test_idx = torch.tensor(shuffle[900:]).long()
      num_nodes = hg.number_of_nodes("paper")
      hg.nodes["paper"].data["train_mask"] = get_binary_mask(
          num_nodes, train_idx
      )
      hg.nodes["paper"].data["val_mask"] = get_binary_mask(
          num_nodes, val_idx
      )
      hg.nodes["paper"].data["test_mask"] = get_binary_mask(
          num_nodes, test_idx
      )
  
      hg.node_dict = {}
      hg.edge_dict = {}
      for node_type in hg.ntypes:
          hg.node_dict[node_type] = len(hg.node_dict)
      for edge_type in hg.etypes:
          hg.edge_dict[edge_type] = len(hg.edge_dict)
  
      for edge_type in hg.etypes:
          hg.edges[edge_type].data["id"] = torch.ones(
              hg.number_of_edges(edge_type), dtype=torch.long
          ) * len(hg.edge_dict)
  
      # Random initialize input feature
      for node_type in hg.ntypes:
          embeddings = torch.Tensor(hg.number_of_nodes(node_type), 256)
          torch.nn.init.xavier_uniform_(embeddings)
          hg.nodes[node_type].data["feat"] = embeddings
  
      super(ACMHGTDataset, self).__init__([hg])
      self.schema["target_node_type"] = "paper"
  
file_path: AutoGL/autogl/datasets/_heterogeneous_datasets/_dgl_heterogeneous_datasets.py
imports: import os
  import dgl.data.utils
  import numpy
  import scipy.io
  import torch
  from autogl.data import InMemoryStaticGraphSet
  from ..None import _dataset_registry
label_desc: Use image node_id 1 to create a new ACMHGTDataset object from inherited base classes: InMemoryStaticGraphSet with example: obj = ACMHGTDataset(path)