code: def test_metric_name():
      assert (
          metric_name("runner_name", "metric_name")
          == "runner_name_metric_name"
      )
      assert (
          metric_name("runner.name", "metric_name")
          == "runner::name_metric_name"
      )
      assert (
          metric_name("runner-name", "metric_name")
          == "runner:name_metric_name"
      )
      assert (
          metric_name("runner_name", "metric.name")
          == "runner_name_metric::name"
      )
      assert (
          metric_name("runner_name", "metric-name")
          == "runner_name_metric:name"
      )
      assert (
          metric_name("runner_name", 1, "metric_name")
          == "runner_name_1_metric_name"
      )
      assert (
          metric_name("runner_name", 1, "method_name", "metric_name")
          == "runner_name_1_method_name_metric_name"
      )
  
file_path: BentoML/tests/unit/_internal/utils/test_metrics.py
imports: from __future__ import annotations
  import math
  from bentoml._internal.utils.metrics import INF
  from bentoml._internal.utils.metrics import exponential_buckets
  from bentoml._internal.utils.metrics import linear_buckets
  from bentoml._internal.utils.metrics import metric_name
label_desc: Use image node_id 4 for calling a global function with example usage: test_metric_name() without return types