code: def print_square_matrix(
      matrix,
      left_name="s",
      top_name="y",
      title=" A square matrix",
      short_title="s,y",
      round_places=2,
  ):
      """Pretty prints a matrix.
  
      Parameters
      ----------
      matrix : np.ndarray
          the matrix to be printed
      left_name : str
          the name of the variable on the left of the matrix
      top_name : str
          the name of the variable on the top of the matrix
      title : str
          Prints this string above the printed square matrix.
      short_title : str
          A short title (6 characters or fewer) like P(labels|y) or P(labels,y).
      round_places : int
          Number of decimals to show for each matrix value."""
  
      short_title = short_title[:6]
      K = len(matrix)  # Number of classes
      # Make sure matrix is 2d array
      if len(np.shape(matrix)) == 1:
          matrix = np.array([matrix])
      print()
      print(title, "of shape", matrix.shape)
      print(
          " "
          + short_title
          + "".join(["\t" + top_name + "=" + str(i) for i in range(K)])
      )
      print("\t---" * K)
      for i in range(K):
          entry = "\t".join(
              [str(z) for z in list(matrix.round(round_places)[i, :])]
          )
          print(left_name + "=" + str(i) + " |\t" + entry)
      print(
          "\tTrace(matrix) =", np.round(np.trace(matrix), round_places)
      )
      print()
  
imports: import warnings
  import numpy
  import pandas
  from typing import Union, Tuple
  from cleanlab.typing import DatasetLike, LabelLike
  from cleanlab.internal.validation import labels_to_array
  from cleanlab.internal.constants import FLOATING_POINT_COMPARISON, TINY_VALUE
label_desc: Use image node_id 11 for calling a global function with example usage: print_square_matrix(matrix, left_name, top_name, title, short_title, round_places) without return types