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: Actual ExperimentWriter object. To use ExperimentWriter features anywhere in your code, do the following.
  
  Example::
  
      self.logger.experiment.some_experiment_writer_function()
docstr_tok: ["Actual","ExperimentWriter","object",".","To","use","ExperimentWriter","features","anywhere","in","your","code",",","do","the","following",".","Example",":",":","self.logger.experiment.some_experiment_writer_function","(",")"]
code: def experiment(self) -> "_ExperimentWriter":
      """Actual ExperimentWriter object. To use ExperimentWriter features anywhere in your code, do the following.
  
      Example::
  
          self.logger.experiment.some_experiment_writer_function()
  
      """
      if self._experiment is not None:
          return self._experiment
  
      os.makedirs(self._root_dir, exist_ok=True)
      self._experiment = _ExperimentWriter(log_dir=self.log_dir)
      return self._experiment
  
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 6 for calling the CSVLogger obj's underlying member method code with example usage: obj.experiment() and returns: self, self