code: def check_increasing(x, y):
      """Determine whether y is monotonically correlated with x.
  
      y is found increasing or decreasing with respect to x based on a Spearman
      correlation test.
  
      Parameters
      ----------
      x : array-like of shape (n_samples,)
              Training data.
  
      y : array-like of shape (n_samples,)
          Training target.
  
      Returns
      -------
      increasing_bool : boolean
          Whether the relationship is increasing or decreasing.
  
      Notes
      -----
      The Spearman correlation coefficient is estimated from the data, and the
      sign of the resulting estimate is used as the result.
  
      In the event that the 95% confidence interval based on Fisher transform
      spans zero, a warning is raised.
  
      References
      ----------
      Fisher transformation. Wikipedia.
      https://en.wikipedia.org/wiki/Fisher_transformation
      """
  
      # Calculate Spearman rho estimate and set return accordingly.
      rho, _ = spearmanr(x, y)
      increasing_bool = rho >= 0
  
      # Run Fisher transform to get the rho CI, but handle rho=+/-1
      if rho not in [-1.0, 1.0] and len(x) > 3:
          F = 0.5 * math.log((1.0 + rho) / (1.0 - rho))
          F_se = 1 / math.sqrt(len(x) - 3)
  
          # Use a 95% CI, i.e., +/-1.96 S.E.
          # https://en.wikipedia.org/wiki/Fisher_transformation
          rho_0 = math.tanh(F - 1.96 * F_se)
          rho_1 = math.tanh(F + 1.96 * F_se)
  
          # Warn if the CI spans zero.
          if np.sign(rho_0) != np.sign(rho_1):
              warnings.warn(
                  "Confidence interval of the Spearman "
                  "correlation coefficient spans zero. "
                  "Determination of ``increasing`` may be "
                  "suspect."
              )
  
      return increasing_bool
  
imports: import math
  import warnings
  from numbers import Real
  import numpy
  from scipy import interpolate
  from scipy.stats import spearmanr
  from ._isotonic import _inplace_contiguous_isotonic_regression, _make_unique
  from .base import BaseEstimator, RegressorMixin, TransformerMixin, _fit_context
  from .utils import check_array, check_consistent_length
  from .utils._param_validation import Interval, StrOptions
  from .utils.validation import _check_sample_weight, check_is_fitted
label_desc: Use image node_id 1 for calling a global function with example usage: check_increasing(x, y) and returns: increasing_bool