code: def test_imcproblem(dataPtr, rank):
      # Test init
      prblm = IMCProblem(dataPtr, rank=rank)
      assert np.array_equal(prblm.X, dataPtr.get_entity("row"))
      assert np.array_equal(prblm.Z, dataPtr.get_entity("col"))
      assert (prblm.Y != dataPtr.get_data()).nnz == 0
      assert prblm.rank == rank
      assert prblm.lambda1 == 1e-2
      assert prblm.W is None
      assert not prblm.optima_reached
  
      # Test solve
      prblm.solve(10, 10, 0)
      assert len(prblm.W) == 3
      assert prblm.optima_reached
  
      # Test reset
      prblm.reset()
      assert prblm.W is None
      assert not prblm.optima_reached
  
file_path: recommenders/tests/unit/recommenders/models/test_geoimc.py
imports: import collections
  import pytest
  import numpy
  from scipy.sparse import csr_matrix
label_desc: Use image node_id 5 for calling a global function with example usage: test_imcproblem(dataPtr, rank) without return types