code: def on_train_batch_end(self, batch_number: int, logs: Dict):
      if self.batch_granularity:
          logs = self._get_logs_without_unknown_keys(logs)
          self._on_train_batch_end_write(batch_number, logs)
  
imports: import csv
  import os
  from typing import Dict, Optional, TextIO
  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 Logger obj's underlying member method code with example usage: obj.on_train_batch_end(batch_number, logs) without return types