code: def get_lasso_coef_by_single_sample_split(info_dict):
      """Gets the lasso coefficients' and metrics on a single sample-splitting.
  
      Randomly splits the data into two parts of equal size. Performs the same
      lasso regression method as ``info_dict["ml_model"]`` to train on
      one part to identify the significant features, then trains OLS on the other
      part with the selected features. Returns the estimated coefficients and the
      standard errors.
  
      Parameters
      ----------
      info_dict : `dict`
          The information dictionary returned by
          `~greykite.algo.common.model_summary_utils.add_beta_var_lm`.
  
      Returns
      -------
      beta : `numpy.array`
          The estimated coefficients. For those features that are selected with
          the first half data, the coefficients are estimated with OLS on the other
          half data. For those features that have coefficients zero with the first
          half data, their coefficients are zero.
      std_err : `numpy.array`
          The standard errors for the estimated coefficients. For zero coefficients,
          the standard errors are set to 1 for the convenience of future calculations,
          they are not the real standard errors.
      df_mse : `float`
          The degree of freedom of the error.
      """
      # Gets indices for the split
      x_0, x_1, y_0, y_1 = train_test_split(
          info_dict["x"], info_dict["y"], test_size=0.5, shuffle=True
      )
      # Performs lasso on x_0 and y_0
      model = clone(info_dict["ml_model"]).fit(x_0, y_0)
      # Gets nonzero features' index
      coef = model.coef_
      coef[0] = model.intercept_
      nonzero_index = model.coef_ != 0
      # Trains regular linear regression on the nonzero features with x_1 and y_1
      x_2 = x_1[:, nonzero_index]  # nonzero features only
      nonzero_beta = sm.OLS(y_1, x_2).fit().params
      beta = np.zeros(len(coef))
      beta[nonzero_index] = nonzero_beta
      df_mse = x_2.shape[0] - np.trace(
          x_2 @ np.linalg.pinv(x_2.T @ x_2) @ x_2.T
      )
      y_pred = x_2 @ nonzero_beta
      residuals = y_1 - y_pred
      mse = np.sum(residuals**2) / df_mse
      covariance = mse * np.linalg.pinv(x_2.T @ x_2)
      standard_err = np.sqrt(
          np.diag(covariance)
      )  # nonzero standard errors
      # The standard errors for the zero betas are not one, but since they should not be
      # used and to avoid warnings for possible divisions, we set them to be one.
      # Remember these are not the real standard errors for the zero beta.
      std_err = np.ones(len(beta))
      std_err[nonzero_index] = standard_err
      return beta, std_err, df_mse
  
imports: import numpy
  import pandas
  import statsmodels
  import statsmodels.api
  from scipy.stats import f
  from scipy.stats import norm
  from scipy.stats import t
  from sklearn.base import clone
  from sklearn.linear_model import Ridge
  from sklearn.model_selection import train_test_split
  from greykite.algo.common.col_name_utils import INTERCEPT
  from greykite.algo.common.col_name_utils import simplify_pred_cols
label_desc: Use image node_id 12 for calling a global function with example usage: get_lasso_coef_by_single_sample_split(info_dict) and returns: beta,  std_err,  df_mse