code: def _get_test_data(use_offset, use_intercept):
      test_file = "test-data/r/sex2withoffset.txt"
      df = pd.read_table(test_file, delimiter="\t").astype("float64")
      phenotypes = df["case"]
      covariates = df.loc[:, "age":"dia"]
      if use_intercept:
          covariates.loc[:, "intercept"] = 1
      offset = df["offset"]
      if not use_offset:
          offset = offset * 0
      return TestData(
          phenotypes.to_numpy(),
          covariates.to_numpy(),
          offset.to_numpy(),
      )
  
imports: from dataclasses import dataclass
  import functions
  import glow.gwas.log_reg
  import glow.gwas.approx_firth
  import pandas
  from nptyping import Float, NDArray
  import numpy
  import pytest
  from typing import Any
label_desc: Use image node_id 1 for calling a global function with example usage: _get_test_data(use_offset, use_intercept) and returns: TestData