code: def _intercept_dot(w, X, y):
      """Computes y * np.dot(X, w).
  
      It takes into consideration if the intercept should be fit or not.
  
      Parameters
      ----------
      w : ndarray, shape (n_features,) or (n_features + 1,)
          Coefficient vector.
  
      X : {array-like, sparse matrix}, shape (n_samples, n_features)
          Training data.
  
      y : ndarray, shape (n_samples,)
          Array of labels.
  
      Returns
      -------
      w : ndarray, shape (n_features,)
          Coefficient vector without the intercept weight (w[-1]) if the
          intercept should be fit. Unchanged otherwise.
  
      X : {array-like, sparse matrix}, shape (n_samples, n_features)
          Training data. Unchanged.
  
      yz : float
          y * np.dot(X, w).
      """
      c = 0.0
      if w.size == X.shape[1] + 1:
          c = w[-1]
          w = w[:-1]
  
      z = safe_sparse_dot(X, w) + c
      yz = y * z
      return w, c, yz
  
imports: import numbers
  import warnings
  import numpy
  from scipy import optimize, sparse
  from .base import LinearClassifierMixin, SparseCoefMixin, BaseEstimator
  from .sag import sag_solver
  from ..feature_selection.from_model import _LearntSelectorMixin
  from ..preprocessing import LabelEncoder, LabelBinarizer
  from ..svm.base import _fit_liblinear
  from ..utils import check_array, check_consistent_length, compute_class_weight
  from ..utils import check_random_state
  from ..utils.extmath import logsumexp, log_logistic, safe_sparse_dot, softmax, squared_norm
  from ..utils.extmath import row_norms
  from ..utils.optimize import newton_cg
  from ..utils.validation import check_X_y
  from ..exceptions import NotFittedError
  from ..utils.fixes import expit
  from ..utils.multiclass import check_classification_targets
  from ..externals.joblib import Parallel, delayed
  from ..model_selection import check_cv
  from ..externals import six
  from ..metrics import SCORERS
label_desc: Use image node_id 1 for calling a global function with example usage: _intercept_dot(w, X, y) and returns: w,  c,  yz