code: def guess_ordinal(values):
      # compare against http://proceedings.mlr.press/v70/valera17a/valera17a.pdf
      # there's some ways to guess month, day, week, year
      # but even if we have that, is that ordinal or categorical?
      # worst hack in the history of probability distributions, maybe ever
      # we compute second derivatives on the histogram. If they look smoother
      # than the shuffled histograms, we assume order is meaningful
      # why second derivatives? Why absolute norms? Why 1.5? good questions!
      if values.min() < 0:
          # we assume that negative numbers imply an ordering, not categories
          # probably needs testing
          return True
      if values.max() > 100000:
          # really large numbers are probably identifiers.
          # also bincount will throw a memory error.
          return False
      counts = np.bincount(values)
  
      def norm(x):
          return np.abs(np.diff(np.diff(x))).sum()
  
      grad_norm = norm(counts)
      # shuffle 100 times
      grad_norm_shuffled = np.mean(
          [
              norm(counts[np.random.permutation(len(counts))])
              for i in range(100)
          ]
      )
      return grad_norm * 1.5 < grad_norm_shuffled
  
imports: from importlib.metadata import version
  from joblib import hash
  import warnings
  from warnings import warn
  import numpy
  import pandas
  from sklearn.base import BaseEstimator, TransformerMixin
  from sklearn.compose import make_column_transformer, ColumnTransformer
  from sklearn.impute import SimpleImputer
  from sklearn.pipeline import make_pipeline
  from sklearn.preprocessing import OneHotEncoder, StandardScaler
  from sklearn.utils.validation import check_is_fitted
label_desc: Use image node_id 3 for calling a global function with example usage: guess_ordinal(values) and returns: unknown, True, False, np