@abstractmethod<EOL><INDENT>def rank_items(self, userid, user_items, selected_items, recalculate_user=False):<DEDENT>
pass<EOL>
Rank given items for a user and returns sorted item list.

Parameters
----------
userid : int
    The userid to calculate recommendations for
user_items : csr_matrix
    A sparse matrix of shape (number_users, number_items). This lets us look
    up the liked items and their weights for the user. This is used to filter out
    items that have already been liked from the output, and to also potentially
    calculate the best items for this user.
selected_items : List of itemids
recalculate_user : bool, optional
    When true, don't rely on stored user state and instead recalculate from the
    passed in user_items

Returns
-------
list
    List of (itemid, score) tuples. it only contains items that appears in
    input parameter selected_items