code: def performance_history(history):
      # SUCCESSFUL
      # level 0
      for i in range(len(history)):
          history[i]
  
      # level 1
      keys = tuple(history[0].keys())
      history[0, keys]
      history[:, keys]
      for key in keys:
          history[0, key]
          history[:, key]
  
      # level 2
      for i in range(len(history[0, "batches"])):
          history[0, "batches", i]
          history[:, "batches", i]
      history[:, "batches", :]
  
      # level 3
      keys = tuple(history[0, "batches", 0].keys())
      history[0, "batches", 0, keys]
      history[:, "batches", 0, keys]
      history[0, "batches", :, keys]
      history[:, "batches", :, keys]
      for key in history[0, "batches", 0]:
          history[0, "batches", 0, key]
          history[:, "batches", 0, key]
          history[0, "batches", :, key]
          history[:, "batches", :, key]
  
      # KEY ERRORS
      # level 0
      safe_slice(history, [100000])
  
      # level 1
      safe_slice(history, [np.s_[0, "foo"], np.s_[:, "foo"]])
  
      # level 2
      safe_slice(
          history,
          [
              np.s_[0, "batches", 0],
              np.s_[:, "batches", 0],
              np.s_[0, "batches", :],
              np.s_[:, "batches", :],
          ],
      )
  
      # level 3
      safe_slice(
          history,
          [
              np.s_[0, "batches", 0, "foo"],
              np.s_[:, "batches", 0, "foo"],
              np.s_[0, "batches", :, "foo"],
              np.s_[:, "batches", :, "foo"],
              np.s_[0, "batches", 0, ("foo", "bar")],
              np.s_[:, "batches", 0, ("foo", "bar")],
              np.s_[0, "batches", :, ("foo", "bar")],
              np.s_[:, "batches", :, ("foo", "bar")],
          ],
      )
  
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 3 for calling a global function with example usage: performance_history(history) without return types