code: def test_log_hyperparams(neptune_mock):
      neptune_mock.utils.stringify_unsupported = lambda x: x
  
      params = {"foo": "bar", "nested_foo": {"bar": 42}}
      test_variants = [
          ({}, "training/hyperparams"),
          ({"prefix": "custom_prefix"}, "custom_prefix/hyperparams"),
          (
              {"prefix": "custom/nested/prefix"},
              "custom/nested/prefix/hyperparams",
          ),
      ]
      for prefix, hyperparams_key in test_variants:
          logger, run_instance_mock, _ = _get_logger_with_mocks(
              api_key="test", project="project", **prefix
          )
          logger.log_hyperparams(params)
          assert run_instance_mock.__setitem__.call_count == 1
          assert run_instance_mock.__getitem__.call_count == 0
          run_instance_mock.__setitem__.assert_called_once_with(
              hyperparams_key, params
          )
  
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 12 for calling a global function with example usage: test_log_hyperparams(neptune_mock) without return types