code: def test_metric_name(mock_run, parse_records, record_q):
      run = mock_run()
      metirc = run.define_metric(
          "metric",
      )
      assert metirc.name == "metric"
  
      parsed = parse_records(record_q)
      assert len(parsed.records) == 1
      assert len(parsed.metric) == 1
  
file_path: wandb/tests/pytest_tests/unit_tests/test_wandb_define_metric.py
imports: import pytest
  import wandb
  from wandb.proto import wandb_internal_pb2
label_desc: Use image node_id 6 for calling a global function with example usage: test_metric_name(mock_run, parse_records, record_q) without return types