code: def _pre_fit(X, y, Xy, precompute, normalize, fit_intercept, copy):
      """Aux function used at beginning of fit in linear models"""
      n_samples, n_features = X.shape
  
      if sparse.isspmatrix(X):
          precompute = False
          X, y, X_offset, y_offset, X_scale = _preprocess_data(
              X,
              y,
              fit_intercept=fit_intercept,
              normalize=normalize,
              return_mean=True,
          )
      else:
          # copy was done in fit if necessary
          X, y, X_offset, y_offset, X_scale = _preprocess_data(
              X,
              y,
              fit_intercept=fit_intercept,
              normalize=normalize,
              copy=copy,
          )
      if hasattr(precompute, "__array__") and (
          fit_intercept
          and not np.allclose(X_offset, np.zeros(n_features))
          or normalize
          and not np.allclose(X_scale, np.ones(n_features))
      ):
          warnings.warn(
              "Gram matrix was provided but X was centered"
              " to fit intercept, "
              "or X was normalized : recomputing Gram matrix.",
              UserWarning,
          )
          # recompute Gram
          precompute = "auto"
          Xy = None
  
      # precompute if n_samples > n_features
      if (
          isinstance(precompute, six.string_types)
          and precompute == "auto"
      ):
          precompute = n_samples > n_features
  
      if precompute is True:
          # make sure that the 'precompute' array is contiguous.
          precompute = np.empty(
              shape=(n_features, n_features), dtype=X.dtype, order="C"
          )
          np.dot(X.T, X, out=precompute)
  
      if not hasattr(precompute, "__array__"):
          Xy = None  # cannot use Xy if precompute is not Gram
  
      if hasattr(precompute, "__array__") and Xy is None:
          common_dtype = np.find_common_type([X.dtype, y.dtype], [])
          if y.ndim == 1:
              # Xy is 1d, make sure it is contiguous.
              Xy = np.empty(
                  shape=n_features, dtype=common_dtype, order="C"
              )
              np.dot(X.T, y, out=Xy)
          else:
              # Make sure that Xy is always F contiguous even if X or y are not
              # contiguous: the goal is to make it fast to extract the data for a
              # specific target.
              n_targets = y.shape[1]
              Xy = np.empty(
                  shape=(n_features, n_targets),
                  dtype=common_dtype,
                  order="F",
              )
              np.dot(y.T, X, out=Xy.T)
  
      return X, y, X_offset, y_offset, X_scale, precompute, Xy
  
imports: from __future__ import division
  from abc import ABCMeta, abstractmethod
  import numbers
  import warnings
  import numpy
  import scipy.sparse
  from scipy import linalg
  from scipy import sparse
  from ..externals import six
  from ..externals.joblib import Parallel, delayed
  from ..base import BaseEstimator, ClassifierMixin, RegressorMixin
  from ..utils import check_array, check_X_y, deprecated, as_float_array
  from ..utils.validation import FLOAT_DTYPES
  from ..utils import check_random_state
  from ..utils.extmath import safe_sparse_dot
  from ..utils.sparsefuncs import mean_variance_axis, inplace_column_scale
  from ..utils.fixes import sparse_lsqr
  from ..utils.seq_dataset import ArrayDataset, CSRDataset
  from ..utils.validation import check_is_fitted
  from ..exceptions import NotFittedError
  from ..preprocessing.data import normalize
label_desc: Use image node_id 6 for calling a global function with example usage: _pre_fit(X, y, Xy, precompute, normalize, fit_intercept, copy) and returns: X,  y,  X_offset,  y_offset,  X_scale,  precompute,  Xy