code: def is_monotonic(a, increasing=True):
      """
      Tests whether a vector a has monotonicity.
  
      Parameters
      ----------
      a : array-like
          Array that should be tested for monotonicity
  
      increasing : bool, default: True
          Test if the array is montonically increasing, otherwise test if the
          array is montonically decreasing.
      """
      a = np.asarray(a)  # ensure a is array-like
  
      if a.ndim > 1:
          raise ValueError("not supported for multi-dimensonal arrays")
  
      if len(a) <= 1:
          return True
  
      if increasing:
          return np.all(a[1:] >= a[:-1], axis=0)
      return np.all(a[1:] <= a[:-1], axis=0)
  
file_path: yellowbrick/yellowbrick/utils/helpers.py
imports: import re
  import inspect
  import sklearn
  import numpy
  from sklearn.pipeline import Pipeline
  from sklearn.utils.validation import check_is_fitted
  from yellowbrick.utils.types import is_estimator
  from yellowbrick.exceptions import YellowbrickTypeError
  from yellowbrick.contrib.wrapper import ContribEstimator
label_desc: Use image node_id 5 for calling a global function with example usage: is_monotonic(a, increasing) and returns: np, True, np