code: def test_offset_wrong_multi_index(spark, rg):
      num_samples = 25
      num_pheno = 10
      contigs = ["chr1", "chr2"]
      genotype_df = pd.DataFrame(rg.random((num_samples, 10)))
      phenotype_df = pd.DataFrame(rg.random((num_samples, num_pheno)))
      offset_df = pd.DataFrame(
          rg.random((num_samples * len(contigs), num_pheno)),
          pd.MultiIndex.from_product([range(1, 26), contigs]),
      )
      with pytest.raises(ValueError):
          run_linear_regression_spark(
              spark, genotype_df, phenotype_df, offset_df=offset_df
          )
  
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 31 for calling a global function with example usage: test_offset_wrong_multi_index(spark, rg) without return types