code: def test_generate_alphas(spark):
      df = spark.createDataFrame(
          [
              Row(header="chr_3_block_8_alpha_0_label_sim1"),
              Row(header="chr_3_block_8_alpha_0_label_sim2"),
              Row(header="chr_3_block_8_alpha_1"),
              Row(header="chr_3_block_8_alpha_1_label_sim1"),
          ]
      )
      expected_alphas = {
          "alpha_0": np.float(2 / 0.99),
          "alpha_1": np.float(2 / 0.75),
          "alpha_2": np.float(2 / 0.5),
          "alpha_3": np.float(2 / 0.25),
          "alpha_4": np.float(2 / 0.01),
      }
      assert generate_alphas(df) == expected_alphas
  
imports: from glow.wgr.model_functions import *
  from glow.wgr.model_functions import _prepare_covariates, _prepare_labels_and_warn
  import math
  import numpy
  import pandas
  from pyspark.sql import Row
  import pytest
  from sklearn.linear_model import LogisticRegression
  from sklearn.datasets import load_breast_cancer
label_desc: Use image node_id 6 for calling a global function with example usage: test_generate_alphas(spark) without return types