code: def plot_top_losses(
      x: TensorImage,
      y: TensorCategory,
      samples,
      outs,
      raws,
      losses,
      nrows=None,
      ncols=None,
      figsize=None,
      **kwargs,
  ):
      axs = get_grid(
          len(samples),
          nrows=nrows,
          ncols=ncols,
          figsize=figsize,
          title="Prediction/Actual/Loss/Probability",
      )
      for ax, s, o, r, l in zip(axs, samples, outs, raws, losses):
          s[0].show(ctx=ax, **kwargs)
          ax.set_title(
              f"{o[0]}/{s[1]} / {l.item():.2f} / {r.max().item():.2f}"
          )
  
imports: from __future__ import annotations
  from packaging.version import parse
  from ..basics import *
  from .core import *
  from .data import *
  from .augment import *
  from .None import models
  import torchvision
  from ..callback.hook import num_features_model
label_desc: Use image node_id 30 for calling a global function with example usage: plot_top_losses(x, y, samples, outs, raws, losses, nrows, ncols, figsize) without return types