code: def _raise_typeerror(X):
      """Raises a TypeError if X is not a CSR or CSC matrix"""
      input_type = X.format if sp.issparse(X) else type(X)
      err = "Expected a CSR or CSC sparse matrix, got %s." % input_type
      raise TypeError(err)
  
imports: import numpy
  import scipy.sparse
  from ..utils.validation import _check_sample_weight
  from .sparsefuncs_fast import csc_mean_variance_axis0
  from .sparsefuncs_fast import csr_mean_variance_axis0
  from .sparsefuncs_fast import incr_mean_variance_axis0
label_desc: Use image node_id 1 for calling a global function with example usage: _raise_typeerror(X) without return types