code: def test_error_for_old_spark(spark, rg):
      if spark.version.startswith("2"):
          num_samples = 10
          genotype_df = pd.DataFrame(rg.random((num_samples, 10)))
          phenotype_df = pd.DataFrame(rg.random((num_samples, 25)))
          with pytest.raises(AttributeError):
              run_linear_regression_spark(
                  spark, genotype_df, phenotype_df, pd.DataFrame({})
              )
  
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 22 for calling a global function with example usage: test_error_for_old_spark(spark, rg) without return types