code: def get_torch_sparse_coo_tensor(root, group, name):
      path = osp.join(root, f"{name}.mat")
      if not osp.exists(path):
          try:
              os.makedirs(root)
          except OSError as e:
              if e.errno != errno.EEXIST and osp.isdir(path):
                  raise e
          url = f"https://sparse.tamu.edu/mat/{group}/{name}.mat"
          print(f"Downloading {group}/{name}:")
          wget.download(url, path)
      matrix = loadmat(path)["Problem"][0][0][2].tocoo()
      row = torch.from_numpy(matrix.row).to(torch.long)
      col = torch.from_numpy(matrix.col).to(torch.long)
      index = torch.stack([row, col], dim=0)
      value = torch.from_numpy(matrix.data).to(torch.float)
      print(f"{name}.mat: shape={matrix.shape} nnz={row.numel()}")
      return torch.sparse_coo_tensor(
          index, value, matrix.shape
      ).coalesce()
  
file_path: pytorch_sparse/benchmark/ptr2ind.py
imports: import os
  import wget
  import time
  import errno
  import argparse
  import os.path
  import torch
  from scipy.io import loadmat
label_desc: Use image node_id 1 for calling a global function with example usage: get_torch_sparse_coo_tensor(root, group, name) and returns: torch