code: def test_matrix(self):
      from scipy.sparse import csc_matrix, csr_matrix, dok_matrix
  
      train_set = Dataset.from_uir(self.triplet_data)
  
      self.assertTrue(isinstance(train_set.matrix, csr_matrix))
      self.assertEqual(train_set.csr_matrix[0, 0], 4)
      self.assertTrue(train_set.csr_matrix.has_sorted_indices)
  
      self.assertTrue(isinstance(train_set.csc_matrix, csc_matrix))
      self.assertEqual(train_set.csc_matrix[4, 4], 3)
  
      self.assertTrue(isinstance(train_set.dok_matrix, dok_matrix))
      self.assertEqual(train_set.dok_matrix[7, 7], 5)
  
imports: import unittest
  import numpy
  import numpy.testing
  from cornac.data import BasketDataset, Dataset, SequentialDataset, Reader
label_desc: Use image node_id 11 for calling the TestDataset obj's underlying member method code with example usage: obj.test_matrix() without return types