code: def test_offset_different_index_order(spark, rg):
      num_samples = 25
      num_pheno = 6
      num_geno = 10
      genotype_df = pd.DataFrame(rg.random((num_samples, num_geno)))
      phenotype_df = pd.DataFrame(rg.random((num_samples, num_pheno)))
      phenotype_df.columns = phenotype_df.columns.astype("str")
      covariate_df = pd.DataFrame(rg.random((num_samples, 2)))
      offset_df = pd.DataFrame(rg.random((num_samples, num_pheno)))
      offset_df.columns = offset_df.columns.astype("str")
      baseline = statsmodels_baseline(
          genotype_df,
          phenotype_df,
          covariate_df,
          [offset_df] * num_geno,
      )
  
      # Results should not depend on index order
      offset_df = offset_df.sort_index(axis=0, ascending=False)
      offset_df = offset_df.sort_index(axis=1, ascending=False)
  
      results = run_linear_regression_spark(
          spark,
          genotype_df,
          phenotype_df,
          covariate_df,
          offset_df=offset_df,
      )
      assert regression_results_equal(results, baseline)
  
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 32 for calling a global function with example usage: test_offset_different_index_order(spark, rg) without return types