code: def positions_by_book(self):
          
          positions = None
          for book in self.books():
              positions[book] = book.positions()
docs: A dictionary of Position objects keyed by book_id.
          :return: