code: def run_score_test(
      genotype_df,
      phenotype_df,
      covariate_df,
      correction=lr.correction_none,
      add_intercept=True,
  ):
      C = covariate_df.to_numpy(copy=True)
      if add_intercept:
          C = gwas_fx._add_intercept(C, phenotype_df.shape[0])
      Y = phenotype_df.to_numpy(copy=True)
      Y_mask = ~np.isnan(Y)
      Y[~Y_mask] = 0
      state_rows = [
          lr._prepare_one_phenotype(
              C,
              pd.Series({"label": p, "values": phenotype_df[p]}),
              correction,
              add_intercept,
          )
          for p in phenotype_df
      ]
      phenotype_names = phenotype_df.columns.to_series().astype("str")
      state = lr._pdf_to_log_reg_state(
          pd.DataFrame(state_rows), phenotype_names, C.shape[1]
      )
      values_df = pd.DataFrame(
          {gwas_fx._VALUES_COLUMN_NAME: list(genotype_df.to_numpy().T)}
      )
      return lr._logistic_regression_inner(
          values_df,
          state,
          C,
          Y,
          Y_mask,
          None,
          lr.correction_none,
          0.05,
          phenotype_df.columns.to_series().astype("str"),
          None,
      )
  
imports: from pyspark.sql.types import ArrayType, DoubleType
  import glow.gwas.log_reg
  import glow.gwas.functions
  import statsmodels.api
  import pandas
  import numpy
  import pytest
label_desc: Use image node_id 1 for calling a global function with example usage: run_score_test(genotype_df, phenotype_df, covariate_df, correction, add_intercept) and returns: lr