code: def interactions_list_to_sparse_matrix(interactions):
      users_column, items_column, ratings_column, _ = zip(*interactions)
      return sparse.coo_matrix(
          (ratings_column, (users_column, items_column)),
          shape=(n_users, n_items),
      )
  
file_path: tensorrec/examples/getting_started.py
imports: from collections import defaultdict
  import csv
  import numpy
  import random
  from scipy import sparse
  from sklearn.preprocessing import MultiLabelBinarizer
  import tensorrec
  import logging
label_desc: Use image node_id 1 for calling a global function with example usage: interactions_list_to_sparse_matrix(interactions) and returns: sparse