code: def plot_confusion_matrix(
      writer: SummaryWriter, name: str, epoch: int
  ) -> None:
      """Plot confusion matrix to tensorboard."""
      fig = plt.figure()
      plt.plot([1, 3, 2])
      writer.add_image(name, figure_to_array(fig), epoch)
  
imports: import matplotlib
  import matplotlib.pyplot
  import numpy
  import io
  from tensorboardX import SummaryWriter
label_desc: Use image node_id 1 for calling a global function with example usage: plot_confusion_matrix(writer, name, epoch) without return types