code: def test_data_generate(self):
      X_train, X_test, y_train, y_test = generate_data(
          n_train=self.n_train,
          n_test=self.n_test,
          contamination=self.contamination,
      )
  
      assert_equal(y_train.shape[0], X_train.shape[0])
      assert_equal(y_test.shape[0], X_test.shape[0])
  
      assert self.n_train - X_train.shape[0] <= 1
      assert_equal(X_train.shape[1], 2)
  
      assert self.n_test - X_test.shape[0] <= 1
      assert_equal(X_test.shape[1], 2)
  
      out_perc = np.sum(y_train) / self.n_train
      assert_allclose(self.contamination, out_perc, atol=0.01)
  
      out_perc = np.sum(y_test) / self.n_test
      assert_allclose(self.contamination, out_perc, atol=0.01)
  
imports: from __future__ import division
  from __future__ import print_function
  import os
  import sys
  import unittest
  import numpy
  from numpy.testing import assert_allclose
  from numpy.testing import assert_equal
  from numpy.testing import assert_raises
  from pyod.utils.data import generate_data_categorical
  from pyod.utils.data import generate_data
  from pyod.utils.data import evaluate_print
  from pyod.utils.data import get_outliers_inliers
  from pyod.utils.data import check_consistent_shape
  from pyod.utils.data import generate_data_clusters
label_desc: Use image node_id 2 for calling the TestData obj's underlying member method code with example usage: obj.test_data_generate() without return types