code: def get_data_path(expt_logger, path_dir=None):
      # some calls contain only experiment not complete logger
  
      # each logger has to have these attributes
      name, version = expt_logger.name, expt_logger.version
  
      # the other experiments...
      if not path_dir:
          path_dir = (
              expt_logger.save_dir
              if hasattr(expt_logger, "save_dir")
              and expt_logger.save_dir
              else _TEMP_PATH
          )
      path_expt = os.path.join(path_dir, name, "version_%s" % version)
  
      # try if the new sub-folder exists, typical case for test-tube
      if not os.path.isdir(path_expt):
          path_expt = path_dir
      return path_expt
  
file_path: pytorch-lightning/tests/tests_pytorch/helpers/utils.py
imports: import functools
  import os
  from lightning.pytorch.callbacks import ModelCheckpoint
  from lightning.pytorch.demos.boring_classes import BoringModel
  from lightning.pytorch.loggers import TensorBoardLogger
  from tests_pytorch import _TEMP_PATH
label_desc: Use image node_id 2 for calling a global function with example usage: get_data_path(expt_logger, path_dir) and returns: path_expt