code: def test_logistic_regression_transform_loco(spark):
      covdf = pd.read_csv(f"{data_root}/cov.csv").set_index("sample_id")
      covdf.index = covdf.index.astype(str, copy=False)
      lvl1df = spark.read.parquet(
          f"{data_root}/bt_reduceded_1part.snappy.parquet"
      )
      sample_blocks_df = (
          spark.read.parquet(f"{data_root}/groupedIDs.snappy.parquet")
          .withColumn(
              "sample_block", f.col("sample_block").cast("string")
          )
          .withColumn(
              "sample_ids",
              f.expr("transform(sample_ids, v -> cast(v as string))"),
          )
      )
      sample_blocks = {
          r.sample_block: r.sample_ids
          for r in sample_blocks_df.collect()
      }
  
      logreg = LogisticRidgeRegression(
          lvl1df, labeldf, sample_blocks, covdf, alphas=alpha_values
      )
      modeldf, cvdf = logreg.fit()
      wgr_cov_loco1_df1 = logreg.transform_loco(chromosomes=["1"])
      modeldf_loco1 = modeldf.filter('header NOT LIKE "%chr_1%"')
      logreg.model_df = modeldf_loco1
      wgr_cov_loco1_df0 = logreg.transform()
  
      wgr_cov_loco1_0 = wgr_cov_loco1_df0[test_label].to_numpy()
      wgr_cov_loco1_1 = wgr_cov_loco1_df1[test_label].to_numpy()
  
      assert np.allclose(wgr_cov_loco1_0, wgr_cov_loco1_1)
  
file_path: glow/python/glow/wgr/tests/test_logistic_ridge_regression.py
imports: from pyspark.sql.functions import PandasUDFType
  from glow.wgr.logistic_udfs import *
  from glow.wgr.logistic_ridge_regression import *
  from pyspark.sql import functions
  import json
  import pandas
  import numpy
label_desc: Use image node_id 9 for calling a global function with example usage: test_logistic_regression_transform_loco(spark) without return types