code: def get_vals(sweep, metric):
      """Gets values for given metric (transformed if metric transform is specified)."""
      compound_key, _, transform = get_info(metric)
      metric_keys = compound_key.split(".")
      vals = [reduce(getitem, metric_keys, data) for data in sweep]
      vals = [transform(v) for v in vals] if transform else vals
      return vals
  
file_path: pycls/pycls/sweep/analysis.py
imports: import json
  from functools import reduce
  from operator import getitem
  import numpy
label_desc: Use image node_id 6 for calling a global function with example usage: get_vals(sweep, metric) and returns: vals