code: def test_feature_inference_fails():
      # On predict if we try to use feature inference and supply
      # higher ids than the number of features that were supplied to fit
      # we should complain
  
      no_users, no_items = (10, 100)
      no_features = 20
  
      train = sp.coo_matrix((no_users, no_items), dtype=np.int32)
  
      user_features = sp.csr_matrix(
          (no_users, no_features), dtype=np.int32
      )
      item_features = sp.csr_matrix(
          (no_items, no_features), dtype=np.int32
      )
      model = LightFM()
      model.fit_partial(
          train,
          user_features=user_features,
          item_features=item_features,
      )
  
      with pytest.raises(ValueError):
          model.predict(
              np.array([no_features], dtype=np.int32),
              np.array([no_features], dtype=np.int32),
          )
  
imports: import numpy
  import pytest
  import scipy.sparse
  from lightfm.lightfm import LightFM
label_desc: Use image node_id 7 for calling a global function with example usage: test_feature_inference_fails() without return types