code: def _load_metrics(path):
      ext = os.path.splitext(path)[1]
      if ext in (".yml", "yaml"):
          return _load_yaml(path)
      if ext in (".json",):
          return _load_json(path)
      raise ValueError(f"unsupported metrics type in {path}")
  
imports: import json
  import logging
  import os
  import subprocess
  import yaml
  from guild import util
  from guild import var
label_desc: Use image node_id 36 for calling a global function with example usage: _load_metrics(path) and returns: _load_yaml, _load_json