code: def test_small_sparse_partial_fit(sparse_container):
      X_sparse = sparse_container(Xdigits[:100])
      X = Xdigits[:100].copy()
  
      rbm1 = BernoulliRBM(
          n_components=64,
          learning_rate=0.1,
          batch_size=10,
          random_state=9,
      )
      rbm2 = BernoulliRBM(
          n_components=64,
          learning_rate=0.1,
          batch_size=10,
          random_state=9,
      )
  
      rbm1.partial_fit(X_sparse)
      rbm2.partial_fit(X)
  
      assert_almost_equal(
          rbm1.score_samples(X).mean(),
          rbm2.score_samples(X).mean(),
          decimal=0,
      )
  
imports: import re
  import sys
  from io import StringIO
  import numpy
  import pytest
  from sklearn.datasets import load_digits
  from sklearn.neural_network import BernoulliRBM
  from sklearn.utils._testing import assert_allclose, assert_almost_equal, assert_array_equal
  from sklearn.utils.fixes import CSC_CONTAINERS, CSR_CONTAINERS, LIL_CONTAINERS
  from sklearn.utils.validation import assert_all_finite
label_desc: Use image node_id 5 for calling a global function with example usage: test_small_sparse_partial_fit(sparse_container) without return types