code: def test_validator(self):
      valid_logits_train = iter([np.array([]), np.array([])])
      valid_logits_test = iter([np.array([]), np.array([])])
      valid_labels_train = iter([np.array([]), np.array([])])
      valid_labels_test = iter([np.array([]), np.array([])])
  
      invalid_logits_train = []
      invalid_logits_test = []
      invalid_labels_train = []
      invalid_labels_test = []
  
      self.assertRaises(
          ValueError,
          Seq2SeqAttackInputData(
              logits_train=valid_logits_train
          ).validate,
      )
      self.assertRaises(
          ValueError,
          Seq2SeqAttackInputData(
              labels_train=valid_labels_train
          ).validate,
      )
      self.assertRaises(
          ValueError,
          Seq2SeqAttackInputData(
              logits_test=valid_logits_test
          ).validate,
      )
      self.assertRaises(
          ValueError,
          Seq2SeqAttackInputData(
              labels_test=valid_labels_test
          ).validate,
      )
      self.assertRaises(
          ValueError, Seq2SeqAttackInputData(vocab_size=0).validate
      )
      self.assertRaises(
          ValueError, Seq2SeqAttackInputData(train_size=0).validate
      )
      self.assertRaises(
          ValueError, Seq2SeqAttackInputData(test_size=0).validate
      )
      self.assertRaises(ValueError, Seq2SeqAttackInputData().validate)
  
      # Tests that both logits and labels must be set.
      self.assertRaises(
          ValueError,
          Seq2SeqAttackInputData(
              logits_train=valid_logits_train,
              logits_test=valid_logits_test,
              vocab_size=0,
              train_size=0,
              test_size=0,
          ).validate,
      )
      self.assertRaises(
          ValueError,
          Seq2SeqAttackInputData(
              labels_train=valid_labels_train,
              labels_test=valid_labels_test,
              vocab_size=0,
              train_size=0,
              test_size=0,
          ).validate,
      )
  
      # Tests that vocab, train, test sizes must all be set.
      self.assertRaises(
          ValueError,
          Seq2SeqAttackInputData(
              logits_train=valid_logits_train,
              logits_test=valid_logits_test,
              labels_train=valid_labels_train,
              labels_test=valid_labels_test,
          ).validate,
      )
  
      self.assertRaises(
          ValueError,
          Seq2SeqAttackInputData(
              logits_train=invalid_logits_train,
              logits_test=invalid_logits_test,
              labels_train=invalid_labels_train,
              labels_test=invalid_labels_test,
              vocab_size=0,
              train_size=0,
              test_size=0,
          ).validate,
      )
  
file_path: privacy/tensorflow_privacy/privacy/privacy_tests/membership_inference_attack/seq2seq_mia_test.py
imports: from absl.testing import absltest
  import numpy
  from tensorflow_privacy.privacy.privacy_tests.membership_inference_attack.data_structures import AttackType
  from tensorflow_privacy.privacy.privacy_tests.membership_inference_attack.seq2seq_mia import run_seq2seq_attack
  from tensorflow_privacy.privacy.privacy_tests.membership_inference_attack.seq2seq_mia import Seq2SeqAttackInputData
label_desc: Use image node_id 1 for calling the Seq2SeqAttackInputDataTest obj's underlying member method code with example usage: obj.test_validator() without return types