code: def test_too_many_missing(spark, rg):
      num_samples = 25
      num_pheno = 24
      num_geno = 18
      contigs = ["chr1", "chr2", "chr3"]
      genotype_df = pd.DataFrame(rg.random((num_samples, num_geno)))
      phenotype_df = pd.DataFrame(rg.random((num_samples, num_pheno)))
      missing = np.triu(np.ones(phenotype_df.shape))
      missing[:, -1] = 0
      phenotype_df[missing.astype("bool")] = np.nan
      covariate_df = pd.DataFrame(rg.random((num_samples, 10)))
      offset_index = pd.MultiIndex.from_product(
          [phenotype_df.index, contigs]
      )
      offset_df = pd.DataFrame(
          rg.random((num_samples * len(contigs), num_pheno)),
          index=offset_index,
      )
      extra_cols = pd.DataFrame({"contigName": contigs * 6})
      with pytest.raises(ValueError):
          run_linear_regression_spark(
              spark,
              genotype_df,
              phenotype_df,
              covariate_df,
              offset_df=offset_df,
              extra_cols=extra_cols,
          )
  
imports: import functions
  import numpy
  import statsmodels.api
  import pandas
  import glow.gwas.functions
  import glow.gwas.lin_reg
  import pytest
label_desc: Use image node_id 28 for calling a global function with example usage: test_too_many_missing(spark, rg) without return types