code: def report(
      losses, batch_sizes, y, y_proba, epoch, time, training=True
  ):
      template = "{} | epoch {:>2} | "
  
      loss = np.average(losses, weights=batch_sizes)
      y_pred = np.argmax(y_proba, axis=1)
      acc = accuracy_score(y, y_pred)
  
      template += "acc: {:.4f} | loss: {:.4f} | time: {:.2f}"
      print(
          template.format(
              "train" if training else "valid",
              epoch + 1,
              acc,
              loss,
              time,
          )
      )
  
imports: import argparse
  import time
  import numpy
  from sklearn.datasets import fetch_openml
  from sklearn.model_selection import train_test_split
  from sklearn.model_selection import StratifiedKFold
  from sklearn.metrics import accuracy_score
  from sklearn.utils import shuffle
  import torch
  from torch import nn
  from skorch.utils import to_device
  from skorch import NeuralNetClassifier
  from skorch.callbacks import EpochScoring
label_desc: Use image node_id 3 for calling a global function with example usage: report(losses, batch_sizes, y, y_proba, epoch, time, training) without return types