code: def test_tensorboard_hparams_reload(tmp_path):
      class CustomModel(BoringModel):
          def __init__(self, b1=0.5, b2=0.999):
              super().__init__()
              self.save_hyperparameters()
  
      trainer = Trainer(
          max_steps=1,
          default_root_dir=tmp_path,
          logger=TensorBoardLogger(tmp_path),
      )
      model = CustomModel()
      assert trainer.log_dir == trainer.logger.log_dir
      trainer.fit(model)
  
      assert trainer.log_dir == trainer.logger.log_dir
      folder_path = trainer.log_dir
  
      # make sure yaml is there
      with open(os.path.join(folder_path, "hparams.yaml")) as file:
          # The FullLoader parameter handles the conversion from YAML
          # scalar values to Python the dictionary format
          yaml_params = yaml.safe_load(file)
          assert yaml_params["b1"] == 0.5
          assert yaml_params["b2"] == 0.999
          assert len(yaml_params.keys()) == 2
  
      # verify artifacts
      assert (
          len(os.listdir(os.path.join(folder_path, "checkpoints"))) == 1
      )
  
imports: import logging
  import os
  from argparse import Namespace
  from unittest import mock
  from unittest.mock import Mock
  import numpy
  import pytest
  import torch
  import yaml
  from lightning.pytorch import Trainer
  from lightning.pytorch.demos.boring_classes import BoringModel
  from lightning.pytorch.loggers import TensorBoardLogger
  from lightning.pytorch.loggers.tensorboard import _TENSORBOARD_AVAILABLE
  from lightning.pytorch.utilities.imports import _OMEGACONF_AVAILABLE
  from tests_pytorch.helpers.runif import RunIf
label_desc: Use image node_id 1 for calling a global function with example usage: test_tensorboard_hparams_reload(tmp_path) without return types