code: def on_step_end(self, step, logs={}):
          
          for callback in self.callbacks:
              # Check if callback supports the more appropriate `on_step_end` callback.
              # If not, fall back to `on_batch_end` to be compatible with built-in Keras callbacks.
              if callable(getattr(callback, 'on_step_end', None)):
                  callback.on_step_end(step, logs=logs)
              else:
                  callback.on_batch_end(step, logs=logs)
docs: Called at end of each step for each callback in callbackList