code: def log_stats(
      self,
      epoch_number: int,
      batch_number: int,
      logs: Dict,
      layer_stats: Dict[str, Dict[str, float]],
  ) -> None:
      for layer, stats in layer_stats.items():
          stats["epoch"] = epoch_number
          stats["batch"] = batch_number
          self.writers[layer].writerow(stats)
          self.csvfiles[layer].flush()
  
imports: import csv
  import os
  from typing import Dict, List, Optional, TextIO, Union
  import torch
  from poutyne.framework.callbacks._utils import atomic_lambda_save
  from poutyne.framework.callbacks.callbacks import Callback
label_desc: Use image node_id 3 for calling the CSVGradientLogger obj's underlying member method code with example usage: obj.log_stats(epoch_number, batch_number, logs, layer_stats) without return types