code: def test_trace_log(mocker):
      t = Trace(name="test")
      mock_run = mocker.MagicMock()
      mocker.patch("wandb.run", mock_run)
      mock_log = mocker.patch.object(mock_run, "log")
  
      t.log("trace")
  
      mock_log.assert_called_once_with({"trace": mocker.ANY})
  
imports: import time
  import pytest
  from wandb.sdk.data_types.trace_tree import Span, SpanKind, StatusCode, Trace
label_desc: Use image node_id 22 for calling a global function with example usage: test_trace_log(mocker) without return types