code: def test_log_hyperparams(tmp_path):
      logger = CSVLogger(tmp_path)
      hparams = {
          "float": 0.3,
          "int": 1,
          "string": "abc",
          "bool": True,
          "dict": {"a": {"b": "c"}},
          "list": [1, 2, 3],
          "layer": torch.nn.BatchNorm1d,
      }
      logger.log_hyperparams(hparams)
      logger.save()
  
      path_yaml = os.path.join(
          logger.log_dir, ExperimentWriter.NAME_HPARAMS_FILE
      )
      params = load_hparams_from_yaml(path_yaml)
      assert all(n in params for n in hparams)
  
imports: import os
  from unittest.mock import MagicMock
  import fsspec
  import pytest
  import torch
  from lightning.pytorch import Trainer
  from lightning.pytorch.core.saving import load_hparams_from_yaml
  from lightning.pytorch.loggers import CSVLogger
  from lightning.pytorch.loggers.csv_logs import ExperimentWriter
  from tests_pytorch.helpers.datamodules import ClassifDataModule
  from tests_pytorch.helpers.runif import RunIf
  from tests_pytorch.helpers.simple_models import ClassificationModel
label_desc: Use image node_id 6 for calling a global function with example usage: test_log_hyperparams(tmp_path) without return types