code: def make_dataset(X, y, sample_weight, random_state=None):
      """Create ``Dataset`` abstraction for sparse and dense inputs.
  
      This also returns the ``intercept_decay`` which is different
      for sparse datasets.
  
      Parameters
      ----------
      X : array-like, shape (n_samples, n_features)
          Training data
  
      y : array-like, shape (n_samples, )
          Target values.
  
      sample_weight : numpy array of shape (n_samples,)
          The weight of each sample
  
      random_state : int, RandomState instance or None (default)
          Determines random number generation for dataset random sampling. It is not
          used for dataset shuffling.
          Pass an int for reproducible output across multiple function calls.
          See :term:`Glossary <random_state>`.
  
      Returns
      -------
      dataset
          The ``Dataset`` abstraction
      intercept_decay
          The intercept decay
      """
  
      rng = check_random_state(random_state)
      # seed should never be 0 in SequentialDataset64
      seed = rng.randint(1, np.iinfo(np.int32).max)
  
      if X.dtype == np.float32:
          CSRData = CSRDataset32
          ArrayData = ArrayDataset32
      else:
          CSRData = CSRDataset64
          ArrayData = ArrayDataset64
  
      if sp.issparse(X):
          dataset = CSRData(
              X.data, X.indptr, X.indices, y, sample_weight, seed=seed
          )
          intercept_decay = SPARSE_INTERCEPT_DECAY
      else:
          X = np.ascontiguousarray(X)
          dataset = ArrayData(X, y, sample_weight, seed=seed)
          intercept_decay = 1.0
  
      return dataset, intercept_decay
  
imports: import numbers
  import warnings
  from abc import ABCMeta, abstractmethod
  from numbers import Integral
  import numpy
  import scipy.sparse
  from scipy import linalg, optimize, sparse
  from scipy.sparse.linalg import lsqr
  from scipy.special import expit
  from ..base import BaseEstimator, ClassifierMixin, MultiOutputMixin, RegressorMixin, _fit_context
  from ..preprocessing._data import _is_constant_feature
  from ..utils import check_array, check_random_state
  from ..utils._array_api import get_namespace
  from ..utils._seq_dataset import ArrayDataset32, ArrayDataset64, CSRDataset32, CSRDataset64
  from ..utils.extmath import _incremental_mean_and_var, safe_sparse_dot
  from ..utils.parallel import Parallel, delayed
  from ..utils.sparsefuncs import inplace_column_scale, mean_variance_axis
  from ..utils.validation import FLOAT_DTYPES, _check_sample_weight, check_is_fitted
label_desc: Use image node_id 2 for calling a global function with example usage: make_dataset(X, y, sample_weight, random_state) and returns: dataset,  intercept_decay