code: def request_profiling_system_metrics(
      trial_id: int, metric_name: str
  ) -> None:
      def validate_gpu_metric_batch(batch: Dict[str, Any]) -> None:
          num_values = len(batch["values"])
          num_batch_indexes = len(batch["batches"])
          num_timestamps = len(batch["timestamps"])
          if not (num_values == num_batch_indexes == num_timestamps):
              pytest.fail(
                  f"mismatched lists: not ({num_values} == {num_batch_indexes} == {num_timestamps})"
              )
  
          if num_values == 0:
              pytest.fail(
                  f"received batch of size 0, something went wrong: {batch}"
              )
  
      with api.get(
          conf.make_master_url(),
          "api/v1/trials/{}/profiler/metrics?{}".format(
              trial_id,
              to_query_params(PROFILER_METRIC_TYPE_SYSTEM, metric_name),
          ),
          stream=True,
      ) as r:
          have_batch = False
          for line in r.iter_lines():
              batch = json.loads(line)["result"]["batch"]
              validate_gpu_metric_batch(batch)
              have_batch = True
          if not have_batch:
              pytest.fail("no batch metrics at all")
  
file_path: determined/e2e_tests/tests/experiment/test_profiling.py
imports: import json
  import tempfile
  from typing import Any, Dict, Optional, Sequence
  from urllib.parse import urlencode
  import pytest
  from determined.common import api, util
  from determined.common.api import authentication, bindings, certs
  from tests import config
  from tests import experiment
label_desc: Use image node_id 3 for calling a global function with example usage: request_profiling_system_metrics(trial_id, metric_name) without return types