class_docstr: Base class for training attack models.
  
  Attributes:
    backend: Name of Scikit-Learn parallel backend to use for this attack
      model. The default value of `None` performs single-threaded training.
    model: The trained attack model.
    ctx_mgr: The backend context manager within which to perform training.
      Defaults to the null context manager for single-threaded training.
    n_jobs: Number of jobs that can run in parallel when using a backend.
      Set to `1` for single-threading, and to `-1` for all parallel
      backends.
docstr: Train an attacker model.
  
  This is trained on examples from train and test datasets.
  Args:
    input_features : array-like of shape (n_samples, n_features) Training
      vector, where n_samples is the number of samples and n_features is the
      number of features.
    is_training_labels : a vector of booleans of shape (n_samples, )
      representing whether the sample is in the training set or not.
    sample_weight: a vector of weights of shape (n_samples, ) that are
      assigned to individual samples. If not provided, then each sample is
      given unit weight. Only the LogisticRegressionAttacker and the
      RandomForestAttacker support sample weights.
code: def train_model(
      self, input_features, is_training_labels, sample_weight=None
  ):
      """Train an attacker model.
  
      This is trained on examples from train and test datasets.
      Args:
        input_features : array-like of shape (n_samples, n_features) Training
          vector, where n_samples is the number of samples and n_features is the
          number of features.
        is_training_labels : a vector of booleans of shape (n_samples, )
          representing whether the sample is in the training set or not.
        sample_weight: a vector of weights of shape (n_samples, ) that are
          assigned to individual samples. If not provided, then each sample is
          given unit weight. Only the LogisticRegressionAttacker and the
          RandomForestAttacker support sample weights.
      """
      raise NotImplementedError()
  
imports: import contextlib
  import dataclasses
  import logging
  from typing import Optional
  import numpy
  from sklearn import ensemble
  from sklearn import linear_model
  from sklearn import model_selection
  from sklearn import neighbors
  from sklearn import neural_network
  from sklearn.utils import parallel_backend
  from tensorflow_privacy.privacy.privacy_tests.membership_inference_attack import data_structures
label_desc: Use image node_id 2 for calling the TrainedAttacker obj's underlying member method code with example usage: obj.train_model(input_features, is_training_labels, sample_weight) without return types