code: def verify_metric(name, value, delta=1e-6):
      if start_http_server is None or requests is None:
          return
      resp = requests.get(
          "http://127.0.0.1:{}".format(_PROMETHEUS_CLIENT_PORT)
      ).text
      assert name in resp
      lines = resp.splitlines()
      for line in lines:
          if line.startswith(name):
              items = line.split(" ")
              assert len(items) == 2
              assert pytest.approx(float(items[1]), abs=delta) == value
  
file_path: mars/mars/metrics/backends/prometheus/tests/test_prometheus_metric.py
imports: import pytest
  import time
  from .....utils import get_next_port
  from ..prometheus_metric import Counter, Gauge, Histogram, Meter
label_desc: Use image node_id 2 for calling a global function with example usage: verify_metric(name, value, delta) without return types