code: def constant_col_finder(x, exclude_cols=None):
      """Finds constant columns in x.
  
      A column is considered as a constant column if all rows have the same value
      and the value is not zero.
  
      Parameters
      ----------
      x : `numpy.array`
          The design matrix.
      exclude_cols : `list`[`int`], default None
          Columns in ``exlucde_cols`` are not considered as constant columns.
  
      Returns
      -------
      constant_cols : `list`[`int`]
          A list of indices that satisfy the constant column conditions.
      """
      if exclude_cols is None:
          exclude_cols = []
      var = x.var(axis=0)
      constant_cols = [
          i
          for i in range(len(var))
          if var[i] == 0 and x[0, i] != 0 and i not in exclude_cols
      ]
      return constant_cols
  
imports: from typing import Union
  import numpy
  import pandas
  from sklearn.exceptions import ConvergenceWarning
  from sklearn.linear_model import Lasso
  from sklearn.linear_model import LassoCV
  from sklearn.linear_model import LinearRegression
  from sklearn.linear_model import Ridge
  from sklearn.linear_model import RidgeCV
  from sklearn.linear_model._coordinate_descent import _alpha_grid
  from sklearn.model_selection import check_cv
  from greykite.common.python_utils import ignore_warnings
label_desc: Use image node_id 1 for calling a global function with example usage: constant_col_finder(x, exclude_cols) and returns: constant_cols