code: def apply_filters(sweep, filters):
      """Filter sweep according to dict of filters of form {metric: [min, med, max]}."""
      filters = filters if filters else {}
      for metric, (v_min, _, v_max) in filters.items():
          keep = [v_min <= v <= v_max for v in get_vals(sweep, metric)]
          sweep = [data for k, data in zip(keep, sweep) if k]
      return sweep
  
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 8 for calling a global function with example usage: apply_filters(sweep, filters) and returns: sweep