def METHOD_NAME(self, task_ids):
    """Returns a set of results for the given tasks."""
    results = [
        key
        for key, value in self._by_result.items()
        if self._is_in_task(value, task_ids)
    ]
    return set(results)