code: def proteins_mtx2dgl():
      """
      This function converts Proteins dataset from mtx to dgl format.
      """
      print("Converting mtx2dgl..")
      print("This might a take while..")
      a_mtx = mmread("proteins.mtx")
      coo = a_mtx.tocoo()
      u = th.tensor(coo.row, dtype=th.int64)
      v = th.tensor(coo.col, dtype=th.int64)
      g = dgl.DGLGraph()
  
      g.add_edges(u, v)
  
      n = g.num_nodes()
      feat_size = 128  ## arbitrary number
      feats = th.empty([n, feat_size], dtype=th.float32)
  
      ## arbitrary numbers
      train_size = 1000000
      test_size = 500000
      val_size = 5000
      nlabels = 256
  
      train_mask = th.zeros(n, dtype=th.bool)
      test_mask = th.zeros(n, dtype=th.bool)
      val_mask = th.zeros(n, dtype=th.bool)
      label = th.zeros(n, dtype=th.int64)
  
      for i in range(train_size):
          train_mask[i] = True
  
      for i in range(test_size):
          test_mask[train_size + i] = True
  
      for i in range(val_size):
          val_mask[train_size + test_size + i] = True
  
      for i in range(n):
          label[i] = random.choice(range(nlabels))
  
      g.ndata["feat"] = feats
      g.ndata["train_mask"] = train_mask
      g.ndata["test_mask"] = test_mask
      g.ndata["val_mask"] = val_mask
      g.ndata["label"] = label
  
      return g
  
file_path: dgl/python/dgl/distgnn/tools/tools.py
imports: import os
  import random
  import requests
  import torch
  from scipy.io import mmread
  import dgl
  from dgl.base import DGLError
  from dgl.data.utils import load_graphs, save_graphs, save_tensors
label_desc: Use image node_id 3 for calling a global function with example usage: proteins_mtx2dgl() and returns: g