code: def on_train_begin(self, logs):
      self.per_batch_losses = []
  
imports: import torch
  import tensorflow
  import os
  import numpy
  import keras
  from keras import layers
  from keras import ops
label_desc: Use image node_id 1 for calling the LossHistory obj's underlying member method code with example usage: obj.on_train_begin(logs) without return types