code: def test_estimate_loco_offsets_logistic_ridge_with_intercept_with_cov(
      spark,
  ):
      covdf = pd.read_csv(
          f"{logistic_ridge_data_root}/cov.csv"
      ).set_index("sample_id")
      covdf.index = covdf.index.astype(str, copy=False)
      labeldf = pd.read_csv(
          f"{logistic_ridge_data_root}/binary_phenotypes.csv"
      ).set_index("sample_id")
      labeldf.index = labeldf.index.astype(str, copy=False)
      indexdf = spark.read.parquet(
          f"{ridge_data_root}/groupedIDs.snappy.parquet"
      )
      blockdf = spark.read.parquet(
          f"{ridge_data_root}/blockedGT.snappy.parquet"
      )
  
      group2ids = __get_sample_blocks(indexdf)
  
      y_hat_df = estimate_loco_offsets(
          blockdf,
          labeldf,
          group2ids,
          covdf,
          reduction_alphas=alphas,
          regression_alphas=alphas,
      )
  
      stack0 = RidgeReduction(
          blockdf, labeldf, group2ids, covdf, alphas=alphas
      )
      stack0.fit_transform()
      regressor = LogisticRidgeRegression.from_ridge_reduction(
          stack0, alphas
      )
      yhatdf = regressor.fit_transform_loco()
  
      assert np.allclose(y_hat_df, yhatdf)
  
file_path: glow/python/glow/wgr/tests/test_estimate_loco_offsets.py
imports: from glow.wgr.ridge_reduction import *
  from glow.wgr.ridge_regression import *
  from glow.wgr.logistic_ridge_regression import *
  from glow.wgr.wgr_functions import estimate_loco_offsets
  import numpy
  import pandas
label_desc: Use image node_id 6 for calling a global function with example usage: test_estimate_loco_offsets_logistic_ridge_with_intercept_with_cov(spark) without return types