code: def summary(self: Learner):
      "Print a summary of the model, optimizer and loss function."
      xb = self.dls.train.one_batch()[
          : getattr(self.dls.train, "n_inp", 1)
      ]
      res = module_summary(self, *xb)
      res += f"Optimizer used: {self.opt_func}\nLoss function: {self.loss_func}\n\n"
      if self.opt is not None:
          res += f"Model " + (
              "unfrozen\n\n"
              if self.opt.frozen_idx == 0
              else f"frozen up to parameter group #{self.opt.frozen_idx}\n\n"
          )
      res += "Callbacks:\n" + "\n".join(
          f"  - {cb}" for cb in self.cbs.sorted("order")
      )
      return PrettyString(res)
  
imports: from __future__ import annotations
  from ..basics import *
label_desc: Use image node_id 13 for calling a global function with example usage: summary() and returns: PrettyString