code: def test_metric_dot_glob(relay_server, user, publish_util, mock_run):
      """Glob escapes the defined metric name."""
      run = mock_run(use_magic_mock=True)
      with relay_server() as relay:
          history = []
          history.append(dict(step=0, data={"this.has.dots": 2}))
          history.append(dict(step=1, data={"this.also": 2}))
          history.append(dict(step=2, data={"nodots": 3}))
          history.append(dict(step=3, data={"this.also": 1}))
  
          m1 = pb.MetricRecord(name="this\\.also")
          m1.options.defined = True
          m1.summary.max = True
          m2 = pb.MetricRecord(glob_name="*")
          m2.options.defined = True
          m2.summary.min = True
          metrics = _make_metrics([m1, m2])
          publish_util(run=run, history=history, metrics=metrics)
  
      metrics = relay.context.get_run_metrics(run.id)
      summary = relay.context.get_run_summary(
          run.id, include_private=True
      )
  
      assert metrics and len(metrics) == 3
      # order doesn't really matter
      assert metrics[0] == {"1": "this\\.also", "7": [2], "6": [3]}
      assert metrics[1] == {"1": "this\\.has\\.dots", "7": [1]}
      assert metrics[2] == {"1": "nodots", "7": [1]}
      assert summary["this.also"] == {"max": 2}
      assert summary["this.has.dots"] == {"min": 2}
      assert summary["nodots"] == {"min": 3}
      assert summary["_step"] == 3
  
imports: from wandb.proto import wandb_internal_pb2
label_desc: Use image node_id 19 for calling a global function with example usage: test_metric_dot_glob(relay_server, user, publish_util, mock_run) without return types