#NEWLINE# def calculate_recommendations( self , vote_list , itemMatch , itemIgnored ) : #NEWLINE# #INDENT# '\n        ``itemMatch`` is supposed to be the result of ``calculate_similarities()``\n\n        Returns a list of recommendations:\n\n        ::\n\n            [\n                (<user1>, [\n                    ("<object_identifier1>", <score>),\n                    ("<object_identifier2>", <score>),\n                ]),\n                (<user2>, [\n                    ("<object_identifier1>", <score>),\n                    ("<object_identifier2>", <score>),\n                ]),\n            ]\n\n        ' #NEWLINE# recommendations = [ ] #NEWLINE# users = set ( map ( ( lambda x : x [ 0 ] ) , vote_list ) ) #NEWLINE# for user in users : #NEWLINE# #INDENT# rankings = self . get_recommended_items ( vote_list , itemMatch , itemIgnored , user ) #NEWLINE# recommendations . append ( ( user , rankings ) ) #NEWLINE# #UNINDENT# return itemMatch