code: def _predict_linear(self, X):
      """Predict using the linear model
  
      Parameters
      ----------
      X : {array-like, sparse matrix}, shape = (n_samples, n_features)
          Samples.
  
      Returns
      -------
      C : array, shape = (n_samples,)
          Returns predicted values.
      """
      if sklearn_check_version("1.0"):
          self._check_feature_names(X, reset=False)
      is_df = is_DataFrame(X)
      if sklearn_check_version("0.23"):
          X = check_array(
              X, accept_sparse="csr", dtype=[np.float64, np.float32]
          )
      X = np.asarray(X) if not sp.issparse(X) and not is_df else X
      good_shape_for_daal = (
          True
          if X.ndim <= 1
          else True
          if X.shape[0] > X.shape[1]
          else False
      )
  
      _patching_status = PatchingConditionsChain(
          "sklearn.linear_model.LinearRegression.predict"
      )
      _dal_ready = _patching_status.and_conditions(
          [
              (
                  hasattr(self, "daal_model_"),
                  "oneDAL model was not trained.",
              ),
              (
                  not sp.issparse(X),
                  "X is sparse. Sparse input is not supported.",
              ),
              (
                  good_shape_for_daal,
                  "The shape of X does not satisfy oneDAL requirements: "
                  "Number of features >= number of samples.",
              ),
              (
                  not hasattr(self, "sample_weight_")
                  or self.sample_weight_ is None,
                  "Sample weights are not supported.",
              ),
          ]
      )
      if hasattr(self, "fit_shape_good_for_daal_"):
          _dal_ready = _patching_status.and_conditions(
              [
                  (
                      self.fit_shape_good_for_daal_,
                      "The shape of X (fitting) does not satisfy oneDAL requirements: "
                      "Number of features + 1 >= number of samples.",
                  )
              ]
          )
      _patching_status.write_log()
      if not _dal_ready:
          return self._decision_function(X)
      X = _daal_check_array(X)
      return _daal4py_predict(self, X)
  
file_path: scikit-learn-intelex/daal4py/sklearn/linear_model/_linear.py
imports: import numpy
  from scipy import sparse
  from sklearn.linear_model import LinearRegression
  from sklearn.utils import check_array
  from .._device_offload import support_usm_ndarray
  from .._utils import sklearn_check_version
  from ..utils.base import _daal_validate_data
  from ..utils.validation import _daal_check_array, _daal_check_X_y
  import logging
  import daal4py
  from .._utils import PatchingConditionsChain, control_n_jobs, get_dtype, get_patch_message, getFPType, is_DataFrame, make2d, run_with_n_jobs
label_desc: Use image node_id 4 for calling a global function with example usage: _predict_linear(X) and returns: _daal4py_predict, self