code: def generate_unstructured_test_data(data_size, text=False):
      df = generate_test_data(data_size, text)
      df.loc[np.random.rand(data_size) < 0.3, "A"] = None
      df["E"] = np.random.choice(
          ["category1", "category2", "category3"], data_size
      )
      df["E"] = df["E"].astype("category")
  
      df["target"] = (df["E"] != "category2") * df["target"]
      df["binary_target"] = _to_binary(df["target"])
      return df
  
imports: import numpy
  import pandas
label_desc: Use image node_id 3 for calling a global function with example usage: generate_unstructured_test_data(data_size, text) and returns: df