code: def test_zero_weights_accuracy():
      # When very small weights are used
      # accuracy should be no better than
      # random.
      weights = train.copy()
      weights.data = np.zeros(train.getnnz(), dtype=np.float32)
  
      for loss in ("logistic", "bpr", "warp"):
          model = LightFM(loss=loss, random_state=SEED)
          model.fit_partial(train, sample_weight=weights, epochs=10)
  
          train_predictions = model.predict(train.row, train.col)
          test_predictions = model.predict(test.row, test.col)
  
          assert (
              0.45 < roc_auc_score(train.data, train_predictions) < 0.55
          )
          assert (
              0.45 < roc_auc_score(test.data, test_predictions) < 0.55
          )
  
imports: import pickle
  import numpy
  import scipy.sparse
  from scipy import stats
  from sklearn.metrics import roc_auc_score
  from sklearn.model_selection import KFold, RandomizedSearchCV
  from lightfm.lightfm import LightFM
  from lightfm.datasets import fetch_movielens
  from lightfm.evaluation import auc_score, precision_at_k
label_desc: Use image node_id 28 for calling a global function with example usage: test_zero_weights_accuracy() without return types