code: def load_node_labels(dataset_path, replication_factor, input_meta):
      num_nodes_dict = {
          node_type: t * replication_factor
          for node_type, t in input_meta["num_nodes"].items()
      }
      node_data = {}
      for node_type in input_meta["num_nodes"].keys():
          node_data[node_type] = {}
          label_path = os.path.join(
              dataset_path, "parquet", node_type, "node_label.parquet"
          )
          if os.path.exists(label_path):
              node_label = pd.read_parquet(label_path)
              if replication_factor > 1:
                  base_num_nodes = input_meta["num_nodes"][node_type]
                  dfr = pd.DataFrame(
                      {
                          "node": pd.concat(
                              [
                                  node_label.node + (r * base_num_nodes)
                                  for r in range(1, replication_factor)
                              ]
                          ),
                          "label": pd.concat(
                              [
                                  node_label.label
                                  for r in range(1, replication_factor)
                              ]
                          ),
                      }
                  )
                  node_label = pd.concat([node_label, dfr]).reset_index(
                      drop=True
                  )
  
              node_label_tensor = torch.full(
                  (num_nodes_dict[node_type],), -1, dtype=torch.float32
              )
              node_label_tensor[
                  torch.as_tensor(node_label.node.values)
              ] = torch.as_tensor(node_label.label.values)
  
              del node_label
              node_data[node_type]["train_idx"] = (
                  (node_label_tensor > -1)
                  .contiguous()
                  .nonzero()
                  .view(-1)
              )
              node_data[node_type]["y"] = node_label_tensor.contiguous()
          else:
              node_data[node_type]["num_nodes"] = num_nodes_dict[
                  node_type
              ]
      return node_data
  
file_path: cugraph/benchmarks/cugraph-dgl/python-script/dgl_dataloading_benchmark/dgl_benchmark.py
imports: import dgl
  import torch
  import pandas
  import os
  import time
  import json
  import random
  import numpy
  from argparse import ArgumentParser
label_desc: Use image node_id 2 for calling a global function with example usage: load_node_labels(dataset_path, replication_factor, input_meta) and returns: node_data