def search(self, query, year=None, timeout=None):
        """Search the database for query, optionally with an estimated year."""
        scores, akascores = search.search(self.dbfile, query, year,
                                          debug=self.debug, timeout=timeout)

        # Return the top-scoring results
        numret = 30
        topscores = heapq.nlargest(numret, scores, scores.get)
        titles = dict((title, IMDbTitle(title, backend=self)) \
                        for title in topscores)
        for title, obj in titles.items():
            if akascores in title:
                obj.aka = akascores[title]
        return [(titles[title], scores[title]) for title in topscores]

# For each parser, add a corresponding property to the IMDbTitle class and a
# populator (to load data into one or more IMDBTitles) to the IMDb class.
dataset/ETHPy150Open nandhp/python-imdb/imdb/__init__.py/IMDb.search/swapped operands of `in`