code: def to_query_params(
      metric_type: str, metric_name: Optional[str] = None
  ) -> str:
      return urlencode(
          {
              "labels.name": metric_name,
              "labels.metricType": metric_type,
          }
      )
  
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 5 for calling a global function with example usage: to_query_params(metric_type, metric_name) and returns: urlencode