code: def __obj_matrix_handler__(matrix, classes, transpose):
      """
      Handle object conditions for the matrix.
  
      :param matrix: the confusion matrix in dict form
      :type matrix: dict
      :param classes: ordered labels of classes
      :type classes: list
      :param transpose: transpose flag
      :type transpose: bool
      :return: matrix parameters as list
      """
      if matrix_check(matrix):
          if class_check(list(matrix.keys())) is False:
              raise pycmMatrixError(MATRIX_CLASS_TYPE_ERROR)
          matrix_param = matrix_params_from_table(
              matrix, classes, transpose
          )
      else:
          raise pycmMatrixError(MATRIX_FORMAT_ERROR)
  
      return matrix_param
  
file_path: pycm/pycm/pycm_handler.py
imports: from __future__ import division
  from .pycm_class_func import class_statistics
  from .pycm_error import pycmVectorError, pycmMatrixError
  from .pycm_overall_func import overall_statistics
  from .pycm_util import *
  from .pycm_param import *
  import json
  import types
  import numpy
label_desc: Use image node_id 6 for calling a global function with example usage: __obj_matrix_handler__(matrix, classes, transpose) and returns: matrix_param