code: def _masked_column_mode(arr, masked_value):
      """Determine the most frequently appearing element in each column in the 2D
      array arr, ignoring any instances of masked_value"""
      mask = _get_mask(arr, masked_value)
      n_features = arr.shape[1]
      most_frequent = np.empty(n_features, dtype=arr.dtype)
      for i in range(n_features):
          feature_mask_idxs = cp.where(~mask[:, i])[0]
          values, counts = cp.unique(
              arr[feature_mask_idxs, i], return_counts=True
          )
          count_max = counts.max()
          if count_max > 0:
              value = values[counts == count_max].min()
          else:
              value = cp.nan
          most_frequent[i] = value
      return cp.array(most_frequent)
  
file_path: cuml/python/cuml/thirdparty_adapters/adapters.py
imports: from cupyx.scipy import sparse
  from scipy import sparse
  from scipy.sparse import csc_matrix
  from scipy.sparse import csc_matrix
  from cuml.internals.safe_imports import cpu_only_import_from
  from cupyx.scipy.sparse import csc_matrix
  from cuml.internals.safe_imports import gpu_only_import_from
  from cuml.internals.global_settings import GlobalSettings
  from cuml.internals.input_utils import input_to_cupy_array, input_to_host_array
  from cuml.internals.safe_imports import gpu_only_import
  from cuml.internals.safe_imports import cpu_only_import
label_desc: Use image node_id 8 for calling a global function with example usage: _masked_column_mode(arr, masked_value) and returns: cp