code: def is_probability_matrix(X: np.ndarray) -> bool:
      if X.ndim == 1:
          return np.all(
              np.isclose(np.sum(abs(X.astype(np.float64)), axis=0), 1)
          )
      elif X.shape[1] == 1:
          return False
      else:
          return np.all(
              np.isclose(np.sum(abs(X.astype(np.float64)), axis=1), 1)
          )
  
file_path: dowhy/dowhy/gcm/divergence.py
imports: from functools import partial
  from typing import Callable, Union
  import numpy
  from scipy.stats import entropy
  from sklearn.model_selection import KFold
  from sklearn.neighbors import NearestNeighbors
  from dowhy.gcm.auto import AssignmentQuality, select_model
  from dowhy.gcm.constant import EPS
  from dowhy.gcm.ml.classification import ClassificationModel, create_logistic_regression_classifier
  from dowhy.gcm.util.general import has_categorical, is_categorical, setdiff2d, shape_into_2d
label_desc: Use image node_id 6 for calling a global function with example usage: is_probability_matrix(X) and returns: np, False, np