code: def test_tensorboard_log_sub_dir(tmp_path):
      # no sub_dir specified
      root_dir = tmp_path / "logs"
      logger = TensorBoardLogger(
          root_dir, name="name", version="version"
      )
      assert logger.log_dir == os.path.join(root_dir, "name", "version")
  
      # sub_dir specified
      logger = TensorBoardLogger(
          root_dir, name="name", version="version", sub_dir="sub_dir"
      )
      assert logger.log_dir == os.path.join(
          root_dir, "name", "version", "sub_dir"
      )
  
imports: import logging
  import os
  from argparse import Namespace
  from unittest import mock
  from unittest.mock import Mock
  import numpy
  import pytest
  import torch
  from lightning.fabric.loggers import TensorBoardLogger
  from lightning.fabric.loggers.tensorboard import _TENSORBOARD_AVAILABLE
  from lightning.fabric.wrappers import _FabricModule
  from tests_fabric.test_fabric import BoringModel
label_desc: Use image node_id 5 for calling a global function with example usage: test_tensorboard_log_sub_dir(tmp_path) without return types