code: def plot_matrix(
      matrix, output_image_path=None, vmin=None, vmax=None, title=None
  ):
      """
      Plot a 2D matrix with viridis color map
  
      :param matrix: 2D numpy array
      :return:
      """
      import matplotlib.pyplot as plt
  
      fig = plt.figure()
      ax = fig.add_subplot(111)
      if title is not None:
          ax.set_title(title)
      plt.imshow(matrix, vmin=vmin, vmax=vmax)
      if matrix.shape[-1] != 3:
          plt.colorbar()
      if output_image_path:
          plt.savefig(str(output_image_path), dpi=200)
      else:
          plt.show()
      plt.close(fig)
  
label_desc: Use image node_id 1 for calling a global function with example usage: plot_matrix(matrix, output_image_path, vmin, vmax, title) without return types