code: def predict_scores(self, user, user_id):
      partial_predictions = []
      # Selects items that user has not interacted with.
      u_list = list(np.flatnonzero(self.matrix[user_id] == 0))
      seen_items_id = np.flatnonzero(self.matrix[user_id])
  
      # predict score for item_i
      for i_id in u_list:
          sim_sum = sorted(
              np.take(self.si_matrix[i_id], seen_items_id),
              key=lambda x: -x,
          )
          partial_predictions.append(
              (user, self.items[i_id], sum(sim_sum[: self.k_neighbors]))
          )
  
      return sorted(partial_predictions, key=lambda x: -x[2])[
          : self.rank_length
      ]
  
file_path: CaseRecommender/caserec/recommenders/item_recommendation/itemknn.py
imports: from collections import defaultdict
  import numpy
  from caserec.recommenders.item_recommendation.base_item_recommendation import BaseItemRecommendation
  from caserec.utils.extra_functions import timed
label_desc: Use image node_id 4 for calling the ItemKNN obj's underlying member method code with example usage: obj.predict_scores(user, user_id) and returns: sorted