code: def test_metric_no_sync_step(relay_server, wandb_init):
      with relay_server() as relay:
          run = wandb_init()
          run_id = run.id
          run.define_metric(
              "val",
              summary="min",
              step_metric="mystep",
              step_sync=False,
          )
          _gen_metric_sync_step(run)
          run.finish()
  
      summary = relay.context.get_run_summary(run_id)
      history = relay.context.get_run_history(run_id)
      metrics = relay.context.get_run_metrics(run_id)
  
      assert summary["val"] == {"min": 2}
      assert summary["val2"] == 8
      assert summary["mystep"] == 5
  
      history_val = history[history["val"].notnull()][
          ["val", "mystep"]
      ].reset_index(drop=True)
      assert (
          history_val["val"][0] == 2 and history_val["mystep"][0] == 1
      )
      assert history_val["val"][1] == 8
      assert (
          history_val["val"][2] == 3 and history_val["mystep"][2] == 5
      )
  
      assert metrics and len(metrics) == 2
  
imports: import pytest
label_desc: Use image node_id 12 for calling a global function with example usage: test_metric_no_sync_step(relay_server, wandb_init) without return types