code: def _to_pyplot(title=None, show=True):
      import matplotlib.pyplot as plt
  
      def handler(image, index, _):
          ndarr = (
              image.mul(255)
              .clamp(0, 255)
              .byte()
              .permute(1, 2, 0)
              .cpu()
              .numpy()
          )
          plt.imshow(ndarr)
          if title is not None:
              plt.title(title.format(index=str(index)))
          plt.axis("off")
  
          if show:
              plt.show()
  
      return handler
  
imports: import torchbearer
  from torchbearer import Callback
  import torch
label_desc: Use image node_id 2 for calling a global function with example usage: _to_pyplot(title, show) and returns: handler