<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def contains_info(self, key, value):
 """ Returns how many cards in the deck have the specified value under the specified key in their info data. This method requires a library to be stored in the deck instance and will return `None` if there is no library. """

        if self.library is None:
            return 0

        load = self.library.load_card
        matches = 0
        for code in self.cards:
            card = load(code)
            if card.get_info(key) == value:
                matches += 1
        return matches