code: def on_train_begin(self, logs: Dict):
      super().on_train_begin(logs)
      self.fieldnames = ["epoch", "batch"] + self.stats_names
  
      if not self.append:
          for layer in self.layers:
              filename = self.filename.format(layer)
              atomic_lambda_save(
                  filename,
                  self._write_header,
                  (),
                  temporary_filename=self.temporary_filename,
              )
  
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 4 for calling the AtomicCSVGradientLogger obj's underlying member method code with example usage: obj.on_train_begin(logs) without return types