code: def _agg_weighted_avg(iur, item, sims, use):
      """
      Weighted-average aggregate.
  
      Args:
          iur(matrix._CSR): the item-user ratings matrix
          item(int): the item index in ``iur``
          sims(numpy.ndarray): the similarities for the users who have rated ``item``
          use(numpy.ndarray): positions in sims and the rating row to actually use
      """
      rates = iur.row_vs(item)
      num = 0.0
      den = 0.0
      for j in use:
          num += rates[j] * sims[j]
          den += np.abs(sims[j])
      return num / den
  
imports: from sys import intern
  import logging
  import pandas
  import numpy
  from numba import njit
  from ..None import util
  from ..data import sparse_ratings
  from .None import Predictor
  from ..util.accum import kvp_minheap_insert
label_desc: Use image node_id 1 for calling a global function with example usage: _agg_weighted_avg(iur, item, sims, use) and returns: unknown