code: def test_leave_k_out_outputs_produce_input():
      """
      Test that the sum of the output matrices is equal to the input matrix (i.e.
      that summing the output matrices produces the input matrix).
      """
  
      mat = _get_matrix()
      train, test = leave_k_out_split(mat, K=1)
      assert ((train + test) - mat).nnz == 0
  
file_path: implicit/tests/evaluation_test.py
imports: import numpy
  import pytest
  from scipy.sparse import csr_matrix, random
  import implicit
  from implicit.evaluation import leave_k_out_split, precision_at_k, train_test_split
  from implicit.datasets.movielens import get_movielens
label_desc: Use image node_id 5 for calling a global function with example usage: test_leave_k_out_outputs_produce_input() without return types