def match(cls, responses, targets) -> float:
        """Return the aggregated Jaccard index between targets and responses."""
        if not isinstance(responses, dict):
            return 0

        all_keys = set(responses) | set(targets)

        num_keys = 0
        total_score = 0
        for key in all_keys:
            total_score += SetEquality.match(
                responses.get(key, []), targets.get(key, [])
            )
            num_keys += 1

        return total_score / num_keys
Return the aggregated Jaccard index between targets and responses.
vlmeval/dataset/utils/megabench/scoring/dict_set_equality_agg_jaccard.py