code: def get_profiling_metrics(
      trial_id: int, metric_type: str
  ) -> List[float]:
      """
      Calls profiler API to return a list of metric values given trial ID and metric type
      """
      with api.get(
          conf.make_master_url(),
          "api/v1/trials/{}/profiler/metrics?{}".format(
              trial_id,
              urlencode(
                  {
                      "labels.name": metric_type,
                      "labels.metricType": "PROFILER_METRIC_TYPE_SYSTEM",
                      "follow": "true",
                  }
              ),
          ),
          stream=True,
      ) as r:
          return [
              batch
              for batches in [
                  json.loads(line)["result"]["batch"]["values"]
                  for line in r.iter_lines()
              ]
              for batch in batches
          ]
  
file_path: determined/e2e_tests/tests/experiment/record_profiling.py
imports: import json
  from statistics import mean
  from typing import Callable, Dict, List, Optional, Tuple
  from urllib.parse import urlencode
  from determined.common import api
  from determined.profiler import SysMetricName
  from tests import config
label_desc: Use image node_id 3 for calling a global function with example usage: get_profiling_metrics(trial_id, metric_type) and returns: unknown