code: def test_prepare_covariates():
      label_df = pd.DataFrame(
          {"Trait_1": [0, -1, 1], "Trait_2": [0, 1, math.nan]}
      )
      cov_df = pd.DataFrame(
          {"Covariate_1": [0, 2, -1], "Covariate_2": [0, -1, 1]}
      )
      expected_df = pd.DataFrame(
          {
              "intercept": [1, 1, 1],
              "Covariate_1": [-0.218218, 1.091089, -0.872872],
              "Covariate_2": [0, -1, 1],
          }
      )
      assert np.allclose(
          _prepare_covariates(cov_df, label_df, True), expected_df
      )
      assert np.allclose(
          _prepare_covariates(cov_df, label_df, False),
          expected_df.drop(columns=["intercept"]),
          1e-5,
      )
  
imports: from glow.wgr.model_functions import *
  from glow.wgr.model_functions import _prepare_covariates, _prepare_labels_and_warn
  import math
  import numpy
  import pandas
  from pyspark.sql import Row
  import pytest
  from sklearn.linear_model import LogisticRegression
  from sklearn.datasets import load_breast_cancer
label_desc: Use image node_id 7 for calling a global function with example usage: test_prepare_covariates() without return types