code: def test_weights_scalar_handler_frozen_layers(dummy_model_factory):
      model = dummy_model_factory(
          with_grads=True, with_frozen_layer=True
      )
  
      wrapper = WeightsScalarHandler(model)
      logger = NeptuneLogger(
          project="tests/dry-run",
          mode="debug",
      )
      mock_engine = MagicMock()
      mock_engine.state = State()
      mock_engine.state.epoch = 5
  
      wrapper(mock_engine, logger, Events.EPOCH_STARTED)
  
      assert_logger_called_once_with(
          logger, "weights_norm/fc2/weight", 12.0
      )
      assert_logger_called_once_with(
          logger, "weights_norm/fc2/bias", math.sqrt(12.0)
      )
  
      assert not logger.exists("weights_norm/fc1/weight")
      assert not logger.exists("weights_norm/fc1/bias")
  
      logger.stop()
  
imports: import math
  import warnings
  from unittest.mock import MagicMock
  import pytest
  import torch
  from ignite.contrib.handlers.neptune_logger import global_step_from_engine, GradsScalarHandler, NeptuneLogger, NeptuneSaver, OptimizerParamsHandler, OutputHandler, WeightsScalarHandler
  from ignite.engine import Engine, Events, State
label_desc: Use image node_id 14 for calling a global function with example usage: test_weights_scalar_handler_frozen_layers(dummy_model_factory) without return types