class_docstr: CSV file logger. CSV headers are time, step, and names passed to `log`.
  
  Args:
      path (str): path to write logs to
      steps_before_flushing: (int, optional): Number of steps to buffer in logger before flushing
      log_all_ranks: (bool, optional): Log all ranks if true, else log only on rank 0.
      async_write: (bool, optional): Whether to write asynchronously or not. Defaults to False.
class_docstr_tok: ["CSV","file","logger",".","CSV","headers","are","time",",","step",",","and","names","passed","to","`","log","`",".","Args",":","path","(","str",")",":","path","to","write","logs","to","steps_before_flushing",":","(","int",",","optional",")",":","Number","of","steps","to","buffer","in","logger","before","flushing","log_all_ranks",":","(","bool",",","optional",")",":","Log","all","ranks","if","true",",","else","log","only","on","rank","0.","async_write",":","(","bool",",","optional",")",":","Whether","to","write","asynchronously","or","not",".","Defaults","to","False","."]
code: def close(self) -> None:
      # toggle off async writing for final flush
      self._async_write = False
      self.flush()
  
file_path: tnt/torchtnt/utils/loggers/csv.py
imports: import csv
  import logging
  from threading import Thread
  from typing import Dict, List, Optional
  from fsspec import open
  from torchtnt.utils.loggers.file import FileLogger
  from torchtnt.utils.loggers.logger import MetricLogger
label_desc: Use image node_id 3 for calling the CSVLogger obj's underlying member method code with example usage: obj.close() without return types