class_docstr: Log to the local file system in CSV format.
  
  Logs are saved to ``os.path.join(root_dir, name, version)``.
  
  Args:
      root_dir: The root directory in which all your experiments with different names and versions will be stored.
      name: Experiment name. Defaults to ``'lightning_logs'``.
      version: Experiment version. If version is not specified the logger inspects the save
          directory for existing versions, then automatically assigns the next available version.
      prefix: A string to put at the beginning of metric keys.
      flush_logs_every_n_steps: How often to flush logs to disk (defaults to every 100 steps).
  
  Example::
  
      from lightning.fabric.loggers import CSVLogger
  
      logger = CSVLogger("path/to/logs/root", name="my_model")
      logger.log_metrics({"loss": 0.235, "acc": 0.75})
      logger.finalize("success")
docstr: The log directory for this run.
  
  By default, it is named ``'version_${self.version}'`` but it can be overridden by passing a string value for the
  constructor's version parameter instead of ``None`` or an int.
docstr_tok: ["The","log","directory","for","this","run",".","By","default",",","it","is","named","``","'version_","$","{","self.version","}","'","``","but","it","can","be","overridden","by","passing","a","string","value","for","the","constructor","'s","version","parameter","instead","of","``","None","``","or","an","int","."]
code: def log_dir(self) -> str:
      """The log directory for this run.
  
      By default, it is named ``'version_${self.version}'`` but it can be overridden by passing a string value for the
      constructor's version parameter instead of ``None`` or an int.
  
      """
      # create a pseudo standard path
      version = (
          self.version
          if isinstance(self.version, str)
          else f"version_{self.version}"
      )
      return os.path.join(self._root_dir, self.name, version)
  
imports: import csv
  import logging
  import os
  from argparse import Namespace
  from typing import Any, Dict, List, Optional, Set, Union
  from torch import Tensor
  from typing_extensions import override
  from lightning.fabric.loggers.logger import Logger, rank_zero_experiment
  from lightning.fabric.utilities.cloud_io import _is_dir, get_filesystem
  from lightning.fabric.utilities.logger import _add_prefix
  from lightning.fabric.utilities.rank_zero import rank_zero_only, rank_zero_warn
  from lightning.fabric.utilities.types import _PATH
label_desc: Use image node_id 5 for calling the CSVLogger obj's underlying member method code with example usage: obj.log_dir() and returns: os