code: def _data_format_checks(X, name):
      _ensure_no_complex_data(X)
  
      if issparse(
          X
      ):  # sklearn.validation._ensure_sparse_format to complicated
          raise ValueError(
              f"The estimator {name} does not work on sparse matrices"
          )
  
file_path: scikit-lego/sklego/meta/_grouped_utils.py
imports: from typing import Tuple
  import numpy
  import pandas
  from scipy.sparse import issparse
  from sklearn.utils import check_array
  from sklearn.utils.validation import _ensure_no_complex_data
  from sklego.common import as_list
label_desc: Use image node_id 5 for calling a global function with example usage: _data_format_checks(X, name) without return types