code: def compare_tags(self, tags):
          ''' given a list of tags that the user has specified, return two lists:
          matched_tags:   tags were found within the current play and match those given
                          by the user
          unmatched_tags: tags that were found within the current play but do not match
                          any provided by the user '''
  
          # gather all the tags in all the tasks into one list
          all_tags = []
          for task in self._tasks:
              all_tags.extend(task.tags)
  
          # compare the lists of tags using sets and return the matched and unmatched
          all_tags_set = set(all_tags)
          tags_set = set(tags)
          matched_tags = all_tags_set & tags_set
          unmatched_tags = all_tags_set - tags_set
  
          return matched_tags, unmatched_tagf compare_tags(self, tags):
          ''' given a list of tags that the user has specified, return two lists:
          matched_tags:   tags were found within the current play and match those given
                          by the user
          unmatched_tags: tags that were found within the current play but do not match
                          any provided by the user '''
  
          # gather all the tags in all the tasks into one list
          all_tags = []
          for task in self._tasks:
              all_tags.extend(task.tags)
  
          # compare the lists of tags using sets and return the matched and unmatched
          all_tags_set = set(all_tags)
          tags_set = set(tags)
          matched_tags = all_tags_set & tags_set
          unmatched_tags = all_tags_set - tags_set
  
          return matched_tags, unmatched_tags
docs: given a list of tags that the user has specified, return two lists:
          matched_tags:   tags were found within the current play and match those given
                          by the user
          unmatched_tags: tags that were found within the current play but do not match
                          any provided by the user