code: def matrix_check(table):
      """
      Check input matrix format.
  
      :param table: input confusion matrix
      :type table: dict
      :return: bool
      """
      try:
          table_keys = table.keys()
          if len(table_keys) == 0:
              return False
          for i in table_keys:
              if (
                  set(table_keys) != set(table[i].keys())
                  or vector_check(list(table[i].values())) is False
              ):
                  return False
          return True
      except Exception:
          return False
  
imports: from __future__ import division
  import sys
  import math
  import numpy
  import re
  from .pycm_param import *
  from .pycm_error import pycmMatrixError
  from warnings import warn
  from functools import wraps
label_desc: Use image node_id 6 for calling a global function with example usage: matrix_check(table) and returns: True, False, False, False