code: def test_synthetic(self, num_train, num_test, dimension, num_classes):
      (
          train_dataset,
          test_dataset,
      ) = datasets.synthetic_linearly_separable_data(
          num_train, num_test, dimension, num_classes
      )
      self.assertEqual(
          train_dataset.points.shape, (num_train, dimension)
      )
      self.assertEqual(train_dataset.labels.shape, (num_train,))
      self.assertEqual(test_dataset.points.shape, (num_test, dimension))
      self.assertEqual(test_dataset.labels.shape, (num_test,))
      # Check that each train and test point has unit l2-norm.
      for i in range(num_train):
          self.assertAlmostEqual(
              np.linalg.norm(train_dataset.points[i, :]), 1
          )
      for i in range(num_test):
          self.assertAlmostEqual(
              np.linalg.norm(test_dataset.points[i, :]), 1
          )
      # Check that each train and test label is in {0,...,num_classes-1}.
      self.assertTrue(
          np.all(np.isin(train_dataset.labels, range(num_classes)))
      )
      self.assertTrue(
          np.all(np.isin(test_dataset.labels, range(num_classes)))
      )
  
file_path: privacy/tensorflow_privacy/privacy/logistic_regression/datasets_test.py
imports: import unittest
  from absl.testing import parameterized
  import numpy
  from tensorflow_privacy.privacy.logistic_regression import datasets
label_desc: Use image node_id 2 for calling the DatasetsTest obj's underlying member method code with example usage: obj.test_synthetic(num_train, num_test, dimension, num_classes) without return types