def _build_metric(self, metric_name: str, score_config: Dict[str, Any]):
        """
        Given a string for the metric (e.g. 'gpt_4o_as_judge'),
        return the actual MetricType or a specialized metric class.
        """
        metric = MetricType.from_string(metric_name)
        if metric == MetricType.VLM_AS_JUDGE:
            # Build the GPT4O metric using the provided config
            gpt4o_configs = score_config.get("gpt4o_eval_configs", {})
            metric = metric.class_impl(gpt4o_configs)
        elif metric == MetricType.ASCII_ART_GPT4O_JUDGE:
            # Build the ASCII Art metric using the provided config
            ascii_art_configs = score_config.get("ascii_art_eval_configs", {})
            metric = metric.class_impl(ascii_art_configs)
        return metric

        Given a string for the metric (e.g. 'gpt_4o_as_judge'),
        return the actual MetricType or a specialized metric class.
        
vlmeval/dataset/utils/megabench/evaluator.py