code: def test_neptune_pickling(neptune_mock):
      neptune_mock.init_run.return_value.exists.return_value = True
      neptune_mock.init_run.return_value.__getitem__.side_effect = (
          _fetchable_paths
      )
  
      unpickleable_run = neptune_mock.init_run()
      with pytest.raises(pickle.PicklingError):
          pickle.dumps(unpickleable_run)
      neptune_mock.init_run.reset_mock()
  
      logger = NeptuneLogger(run=unpickleable_run)
      assert neptune_mock.init_run.call_count == 0
  
      pickled_logger = pickle.dumps(logger)
      unpickled = pickle.loads(pickled_logger)
  
      neptune_mock.init_run.assert_called_once_with(
          name="Run test name", run="TEST-1"
      )
      assert unpickled.experiment is not None
  
imports: import os
  import pickle
  from collections import namedtuple
  from unittest import mock
  from unittest.mock import MagicMock, call
  import lightning.pytorch
  import pytest
  import torch
  from lightning.pytorch import Trainer
  from lightning.pytorch.demos.boring_classes import BoringModel
  from lightning.pytorch.loggers import NeptuneLogger
label_desc: Use image node_id 7 for calling a global function with example usage: test_neptune_pickling(neptune_mock) without return types