code: def linearly_separable_labeled_examples(
      num_examples: int, weights: np.ndarray
  ) -> RegressionDataset:
      """Generates num_examples labeled examples using separator given by weights.
  
      Args:
        num_examples: number of labeled examples to generate.
        weights: dimension by num_classes matrix containing coefficients of linear
          separator, where dimension is the dimension and num_classes is the number
          of classes.
  
      Returns:
        RegressionDataset consisting of points and labels. Each point has unit
          l2-norm.
      """
      dimension = weights.shape[0]
      # Generate points and normalize each to have unit l2-norm.
      points_non_normalized = np.random.normal(
          size=(num_examples, dimension)
      )
      points = preprocessing.normalize(points_non_normalized)
      # Compute labels.
      labels = np.argmax(np.matmul(points, weights), axis=1)
      return RegressionDataset(points, labels, weights)
  
file_path: privacy/tensorflow_privacy/privacy/logistic_regression/datasets.py
imports: import dataclasses
  from typing import Tuple, Optional
  import numpy
  from sklearn import preprocessing
  import tensorflow
label_desc: Use image node_id 1 for calling a global function with example usage: linearly_separable_labeled_examples(num_examples, weights) and returns: RegressionDataset