code: def test_grads_scalar_handler_wrong_setup():
      model = MagicMock(spec=torch.nn.Module)
      wrapper = GradsScalarHandler(model)
      mock_logger = MagicMock()
      mock_engine = MagicMock()
      with pytest.raises(
          RuntimeError,
          match="Handler 'GradsScalarHandler' works only with TensorboardLogger",
      ):
          wrapper(mock_engine, mock_logger, Events.ITERATION_STARTED)
  
imports: import math
  import os
  from unittest.mock import ANY, call, MagicMock, patch
  import pytest
  import torch
  from ignite.contrib.handlers.tensorboard_logger import global_step_from_engine, GradsHistHandler, GradsScalarHandler, OptimizerParamsHandler, OutputHandler, TensorboardLogger, WeightsHistHandler, WeightsScalarHandler
  from ignite.engine import Engine, Events, State
label_desc: Use image node_id 17 for calling a global function with example usage: test_grads_scalar_handler_wrong_setup() without return types