code: def get_input_dfs(
      spark, binary, num_snps=100, missing=[], single_chr=True
  ):
      if single_chr:
          genotype_file = "example.bgen"
      else:
          genotype_file = "example_3chr.bgen"
      if binary:
          phenotype_file = "phenotype_bin.txt"
          offset_trait1_file = "fit_bin_out_1.loco"
          offset_trait2_file = "fit_bin_out_2.loco"
      else:
          phenotype_file = "phenotype.txt"
          if single_chr:
              offset_trait1_file = "fit_lin_out_1.loco"
              offset_trait2_file = "fit_lin_out_2.loco"
          else:
              offset_trait1_file = "fit_lin_out_3chr_1.loco"
              offset_trait2_file = "fit_lin_out_3chr_2.loco"
  
      genotype_df = (
          spark.read.format("bgen")
          .load(test_data_dir + genotype_file)
          .withColumn("values", fx.genotype_states("genotypes"))
          .filter(f"start < {num_snps}")
      )
  
      phenotype_df = _set_fid_iid_df(
          pd.read_table(test_data_dir + phenotype_file, sep=r"\s+")
      )
      phenotype_df.loc[missing, :] = np.nan
  
      covariate_df = _set_fid_iid_df(
          pd.read_table(test_data_dir + "covariates.txt", sep=r"\s+")
      )
  
      offset_trait1_df = _read_offset_df(
          test_data_dir + offset_trait1_file, "Y1"
      )
      offset_trait2_df = _read_offset_df(
          test_data_dir + offset_trait2_file, "Y2"
      )
      offset_df = pd.merge(
          offset_trait1_df,
          offset_trait2_df,
          left_index=True,
          right_index=True,
      )
  
      return (genotype_df, phenotype_df, covariate_df, offset_df)
  
file_path: glow/python/glow/gwas/tests/functions.py
imports: import glow.functions
  import numpy
  import pandas
  from pandas.testing import assert_frame_equal
label_desc: Use image node_id 4 for calling a global function with example usage: get_input_dfs(spark, binary, num_snps, missing, single_chr) and returns: genotype_df,  phenotype_df,  covariate_df,  offset_df