code: def parse_metric_to_base(metric_string: str) -> float:
      """Given a metric string with various unit, convert
      to original base
  
      wrk metric unit reference
      https://github.com/wg/wrk/blob/master/src/units.c#L35-L39
  
          Example:
              "71.91" -> 71.91
              "1.32k" -> 1320
              "1.5M" -> 1500000
      """
  
      parsed = re.split(r"(\d+.?\d+)(\w*)", metric_string)
      values = [val for val in parsed if val]
  
      if len(values) == 1:
          return float(values[0])
      if values[1] == "k":
          return float(values[0]) * 1000
      elif values[1] == "M":
          return float(values[0]) * 1000 * 1000
  
      # Should not return here in common benchmark
      return values[1]
  
file_path: ray/release/serve_tests/workloads/serve_test_utils.py
imports: import json
  import logging
  import os
  import random
  import ray
  import re
  import subprocess
  from collections import defaultdict
  from serve_test_cluster_utils import NUM_CPU_PER_NODE
  from subprocess import PIPE
  from typing import Dict, List, Union
label_desc: Use image node_id 4 for calling a global function with example usage: parse_metric_to_base(metric_string) and returns: values, float, unknown, unknown