code: def _simple_regression_data(
      number_a0,
      number_a1,
      a0_factor,
      a1_factor,
      a0_label,
      a1_label,
      A_two_dim=False,
  ):
      a0s = np.full(number_a0, a0_label)
      a1s = np.full(number_a1, a1_label)
  
      a0_scores = np.linspace(0, 1, number_a0)
      a1_scores = np.linspace(0, 1, number_a1)
      score_feature = np.concatenate((a0_scores, a1_scores), axis=None)
  
      A = np.concatenate((a0s, a1s), axis=None)
  
      Y_a0 = a0_factor * a0_scores
      Y_a1 = a1_factor * a1_scores
  
      Y = np.concatenate((Y_a0, Y_a1), axis=None)
  
      X = pd.DataFrame(
          {
              "actual_feature": score_feature,
              "sensitive_features": A,
              "constant_ones_feature": np.ones(len(Y)),
          }
      )
  
      if A_two_dim:
          A = np.stack((A, A), -1)
  
      return X, Y, A
  
file_path: fairlearn/test/unit/reductions/grid_search/test_grid_search_regression.py
imports: import copy
  from test.unit.reductions.grid_search.utilities import assert_n_grid_search_results
  from test.unit.utility_functions import logging_all_close
  import numpy
  import pandas
  import pytest
  from sklearn.linear_model import LinearRegression
  from fairlearn.reductions import BoundedGroupLoss, GridSearch, SquareLoss, ZeroOneLoss
label_desc: Use image node_id 1 for calling a global function with example usage: _simple_regression_data(number_a0, number_a1, a0_factor, a1_factor, a0_label, a1_label, A_two_dim) and returns: X,  Y,  A