class_docstr: Callback that streams epoch results to a csv file.
  
  Supports all values that can be represented as a string,
  including 1D iterables such as `np.ndarray`.
  
  Example:
  
      ```python
      csv_logger = CSVLogger('training.log')
      model.fit(X_train, Y_train, callbacks=[csv_logger])
      ```
code: def on_epoch_end(self, epoch, logs=None):
      logs = logs or {}
  
      def handle_value(k):
          is_zero_dim_ndarray = (
              isinstance(k, np.ndarray) and k.ndim == 0
          )
          if isinstance(k, six.string_types):
              return k
          elif isinstance(k, tp.Iterable) and not is_zero_dim_ndarray:
              return '"[%s]"' % (", ".join(map(str, k)))
          else:
              return k
  
      if self.keys is None:
          self.keys = sorted(logs.keys())
  
      if self.model.stop_training:
          # We set NA so that csv parsers do not fail for this last epoch.
          logs = dict(
              [
                  (k, logs[k]) if k in logs else (k, "NA")
                  for k in self.keys
              ]
          )
  
      if not self.writer:
  
          class CustomDialect(csv.excel):
              delimiter = self.sep
  
          fieldnames = ["epoch"] + self.keys
  
          self.writer = csv.DictWriter(
              self.csv_file,
              fieldnames=fieldnames,
              dialect=CustomDialect,
          )
          if self.append_header:
              self.writer.writeheader()
  
      row_dict = collections.OrderedDict({"epoch": epoch})
      row_dict.update(
          (key, handle_value(logs[key])) for key in self.keys
      )
      self.writer.writerow(row_dict)
      self.csv_file.flush()
  
file_path: elegy/elegy/callbacks/csv_logger.py
imports: import collections
  import csv
  import io
  import os
  import typing
  import numpy
  import six
  from .callback import Callback
label_desc: Use image node_id 3 for calling the CSVLogger obj's underlying member method code with example usage: obj.on_epoch_end(epoch, logs) and returns: k, unknown, k