code: def ols_model(**kwargs):
      # Ordinary Least Squares (OLS)
      np.random.seed(9876789)
      nsamples = 100
      x = np.linspace(0, 10, 100)
      X = np.column_stack((x, x**2))
      beta = np.array([1, 0.1, 10])
      e = np.random.normal(size=nsamples)
      X = sm.add_constant(X)
      y = np.dot(X, beta) + e
  
      ols = sm.OLS(y, X)
      model = ols.fit(**kwargs)
  
      return ModelWithResults(
          model=model, alg=ols, inference_dataframe=X
      )
  
imports: from collections import namedtuple
  import numpy
  import pandas
  import statsmodels.api
  from scipy.linalg import toeplitz
  from statsmodels.tsa.arima.model import ARIMA
  from statsmodels.tsa.arima_process import arma_generate_sample
  from mlflow.models import ModelSignature
  from mlflow.types.schema import Schema, TensorSpec
label_desc: Use image node_id 1 for calling a global function with example usage: ols_model() and returns: ModelWithResults