code: def get_avg_metric_from_extractor(
      logs: LogType, extractor: ExtractorFnType, metric_name: str
  ) -> float:
      metric_folds = extract(logs["validator_log"], extractor)
      return metric_folds[metric_name].mean()
  
file_path: fklearn/src/fklearn/tuning/utils.py
imports: from typing import Any, Dict, Generator, List
  from toolz.curried import reduce, partial, pipe, first, curry
  from fklearn.metrics.pd_extractors import extract
  from fklearn.types import LogListType, LogType, ExtractorFnType, ValidatorReturnType, EvalReturnType
label_desc: Use image node_id 1 for calling a global function with example usage: get_avg_metric_from_extractor(logs, extractor, metric_name) and returns: metric_folds