docstr: The code here is the same as in the ``Trainer.log_dir``, with the exception of the broadcast call.
code: def _get_logdir(trainer: "pl.Trainer") -> str:
      """The code here is the same as in the ``Trainer.log_dir``, with the exception of the broadcast call."""
      if len(trainer.loggers) == 1:
          if isinstance(trainer.logger, TensorBoardLogger):
              dirpath = trainer.logger.log_dir
          else:
              dirpath = trainer.logger.save_dir
      else:
          dirpath = trainer.default_root_dir
      return dirpath
  
imports: import inspect
  from typing import TYPE_CHECKING, Any, Dict, Union
  import lightning.pytorch
  from lightning.app.storage.path import Path
  from lightning.app.utilities.app_helpers import Logger
  from lightning.pytorch import Callback
  from lightning.pytorch.callbacks.progress.progress_bar import get_standard_metrics
  from lightning.pytorch.loggers import TensorBoardLogger, WandbLogger
  from lightning.pytorch.utilities.parsing import collect_init_args
  from core.state import ProgressBarState, TrainerState
label_desc: Use image node_id 5 for calling the PLAppArtifactsTracker obj's underlying member method code with example usage: obj._get_logdir(trainer) and returns: dirpath