code: def generate_test_data(data_size, text=False):
      df = pd.DataFrame()
  
      np.random.seed(0)
      df["A"] = np.random.rand(data_size)
      df["B"] = np.random.rand(data_size)
      df["C"] = np.random.rand(data_size)
      df["D"] = np.random.rand(data_size)
  
      df["D2"] = df["D"].values + 0.1 * np.random.rand(data_size)
      df.loc[df["D2"] > 1, "D2"] = None
  
      df["target"] = (
          0.2 * np.random.rand(data_size)
          + df["A"] * df["D"]
          + 2 * df["B"]
      )
      df["binary_target"] = _to_binary(df["target"])
  
      if text:
          df["T"] = np.random.choice(
              ["Bojack", "Horseman", "Todd", "Chavez"], data_size
          )
          df["target"] *= df["T"] == "Todd"
          df["binary_target"] *= df["T"] == "Todd"
  
      return df
  
imports: import numpy
  import pandas
label_desc: Use image node_id 2 for calling a global function with example usage: generate_test_data(data_size, text) and returns: df