code: def fill_similarity_matrix(self):
      self.si_matrix = np.zeros((len(self.items), len(self.items)))
      items_sim = set()
  
      with open(self.similarity_file, "r", encoding="utf-8") as infile:
          items = set(self.items)
          for line in infile:
              if line.strip():
                  inline = line.split(self.similarity_sep)
                  item_a, item_b, sim = (
                      int(inline[0]),
                      int(inline[1]),
                      float(inline[2].rstrip()),
                  )
  
                  if item_a in items and item_b in items:
                      map_a = self.item_to_item_id[item_a]
                      map_b = self.item_to_item_id[item_b]
                      items_sim.add(item_a)
                      items_sim.add(item_b)
                      self.si_matrix[map_a][map_b] = sim
                      self.si_matrix[map_b][map_a] = sim
  
      if self.verbose:
          print("Number of item in similarity file:", len(items_sim))
      del items_sim
  
file_path: CaseRecommender/caserec/recommenders/rating_prediction/item_msmf.py
imports: import numpy
  from caserec.recommenders.rating_prediction.matrixfactorization import MatrixFactorization
  from caserec.utils.extra_functions import timed
label_desc: Use image node_id 3 for calling the ItemMSMF obj's underlying member method code with example usage: obj.fill_similarity_matrix() without return types