code: def test_one_level_regression(spark):
      indexdf = spark.read.parquet(
          f"{data_root}/groupedIDs.snappy.parquet"
      )
      blockdf = spark.read.parquet(
          f"{data_root}/blockedGT.snappy.parquet"
      )
      testLabel = "sim100"
  
      group2ids = __get_sample_blocks(indexdf)
      bestAlpha, bestr2, y_hat = __calculate_y_hat(
          X1, group2ids, testLabel
      )
  
      stack0 = RidgeReduction(
          blockdf,
          labeldf,
          group2ids,
          add_intercept=False,
          alphas=alphas,
      )
      stack0.fit()
      stack0.transform()
  
      regressor = RidgeRegression.from_ridge_reduction(stack0, alphas)
      _, cvdf = regressor.fit()
      yhatdf = regressor.transform()
  
      r = (
          cvdf.filter(f'label = "{testLabel}"')
          .select("alpha", "r2_mean")
          .head()
      )
      bestAlpha_lvl, bestr2_lvl = (r.alpha, r.r2_mean)
      y_hat_lvl = np.array(yhatdf[testLabel])
  
      assert (
          bestAlpha_lvl == bestAlpha
          and np.isclose(bestr2_lvl, bestr2)
          and np.allclose(y_hat_lvl, np.array(y_hat))
      )
  
imports: from glow.wgr.ridge_reduction import *
  from glow.wgr.ridge_regression import *
  from glow.wgr.ridge_udfs import *
  from glow.wgr.model_functions import _fill_na_and_standardize
  import numpy
  import pandas
  from pyspark.sql.functions import *
  import math
label_desc: Use image node_id 11 for calling a global function with example usage: test_one_level_regression(spark) without return types