code: def test_neptune_saver(model, serializable):
      mock_logger = MagicMock(spec=NeptuneLogger)
      mock_logger.upload = MagicMock()
  
      to_save_non_serializable = {"model": model}
  
      saver = NeptuneSaver(mock_logger)
      fname = "test.pt"
      try:
          with warnings.catch_warnings():
              # Ignore torch/serialization.py:292: UserWarning: Couldn't retrieve source code for container of type
              # DummyModel. It won't be checked for correctness upon loading.
              warnings.simplefilter("ignore", category=UserWarning)
              saver(to_save_non_serializable, fname)
      except Exception:
          pass
  
      assert mock_logger["model"].upload.call_count == int(serializable)
  
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 21 for calling a global function with example usage: test_neptune_saver(model, serializable) without return types