def match(cls, responses, targets) -> float:
        """Return the aggregated Jaccard index between targets and responses."""
        responses = cast_to_dict(responses)
        targets = cast_to_dict(targets)

        if not isinstance(responses, dict):
            return 0

        num_keys = 0
        total_score = 0
        for key, answer in targets.items():
            total_score += ExactStrMatch.match(responses.get(key), answer)
            num_keys += 1

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