code: def test_meter(init_firstly):
      if init_firstly:
          init_metrics()
      m = Metrics.meter("test_meter")
      assert m.name == "test_meter"
      assert m.description == ""
      assert m.tag_keys == ()
      assert m.type == "Meter"
      if not init_firstly:
          init_metrics()
      m.record(1)
      assert m.value == 0
      m.record(2001)
      assert m.value > 0
  
file_path: mars/mars/metrics/tests/test_metric_api.py
imports: import pytest
  from random import random
  from ..None import api
  from ..api import init_metrics, Metrics, _percentile_builder, Percentile, record_time_cost_percentile, shutdown_metrics
label_desc: Use image node_id 5 for calling a global function with example usage: test_meter(init_firstly) without return types