code: def on_batch_end(self, net, **kwargs):
      try:
          net.history[-1, "batches", -1, "foobar"]
      except Exception as e:
          pass
  
file_path: skorch/examples/benchmarks/history.py
imports: from pprint import pprint
  import time
  import numpy
  from sklearn.datasets import make_classification
  import torch
  from skorch import NeuralNetClassifier
  from skorch.callbacks import Callback
  from skorch.toy import make_classifier
label_desc: Use image node_id 1 for calling the TriggerKeyError obj's underlying member method code with example usage: obj.on_batch_end(net) without return types