code: def run_one_lmm(genotypes, phenotypes, groups):
      try:
          intercept = np.ones(genotypes.size)
          genotypes = genotypes.copy()
          x = np.stack([intercept, genotypes], axis=1)
          # Return p-value for genotype coefficient
          return sm.MixedLM(phenotypes, x, groups).fit().pvalues[1]
      except np.linalg.LinAlgError:
          # Could not fit model, return NaN
          return float("nan")
  
imports: import pyspark.sql.functions
  import pandas
  import statsmodels.api
  import numpy
  from pyspark.sql.types import DoubleType
  import glow
label_desc: Use image node_id 1 for calling a global function with example usage: run_one_lmm(genotypes, phenotypes, groups) and returns: sm, float