code: def _test_distributed() -> None:
      dist.init_process_group("gloo")
      rank = dist.get_rank()
      with tempfile.TemporaryDirectory() as log_dir:
          test_path = "correct"
          invalid_path = "invalid"
          if rank == 0:
              logger = TensorBoardLogger(
                  os.path.join(log_dir, test_path)
              )
          else:
              logger = TensorBoardLogger(
                  os.path.join(log_dir, invalid_path)
              )
  
          assert test_path in logger.path
          assert invalid_path not in logger.path
  
file_path: tnt/tests/utils/loggers/test_tensorboard.py
imports: from __future__ import annotations
  import os
  import tempfile
  import unittest
  from unittest.mock import Mock, patch
  import torch.distributed.launcher
  from tensorboard.backend.event_processing.event_accumulator import EventAccumulator
  from torch import distributed
  from torchtnt.utils.loggers.tensorboard import TensorBoardLogger
  from torchtnt.utils.test_utils import get_pet_launch_config
label_desc: Use image node_id 5 for calling the TensorBoardLoggerTest obj's underlying member method code with example usage: obj._test_distributed() without return types