code: def test_base_weights_scalar_handler_wrong_setup():
      model = MagicMock(spec=torch.nn.Module)
      with pytest.raises(
          TypeError, match="Argument reduction should be callable"
      ):
          DummyWeightsScalarHandler(model, reduction=123)
  
      with pytest.raises(
          TypeError,
          match="Output of the reduction function should be a scalar",
      ):
          DummyWeightsScalarHandler(model, reduction=lambda x: x)
  
imports: from typing import Any, Union
  from unittest.mock import call, MagicMock
  import pytest
  import torch
  from ignite.contrib.handlers.base_logger import BaseLogger, BaseOptimizerParamsHandler, BaseOutputHandler, BaseWeightsHandler, BaseWeightsScalarHandler
  from ignite.engine import Engine, Events, EventsList, State
  from tests.ignite.contrib.handlers import MockFP16DeepSpeedZeroOptimizer
label_desc: Use image node_id 10 for calling a global function with example usage: test_base_weights_scalar_handler_wrong_setup() without return types