code: def gen_matrix(path, device):
      with open(path) as file:
          nrows, ncols, nnz = (
              int(el) for el in file.readline().split(", ")
          )
          index_pointers = (int(el) for el in file.readline().split())
          indices = (int(el) for el in file.readline().split())
          return torch.randn(
              nrows, ncols, dtype=torch.double, device=device
          )
  
file_path: pytorch/benchmarks/sparse/dlmc/utils.py
imports: import math
  from pathlib import Path
  import torch
  from scipy import sparse
label_desc: Use image node_id 7 for calling a global function with example usage: gen_matrix(path, device) and returns: torch