code: def get_seq2seq_test_input(
      n_train,
      n_test,
      max_seq_in_batch,
      max_tokens_in_sequence,
      vocab_size,
      seed=None,
  ):
      """Returns example inputs for attacks on seq2seq models."""
      if seed is not None:
          np.random.seed(seed=seed)
  
      logits_train, labels_train = [], []
      for _ in range(n_train):
          num_sequences = np.random.choice(max_seq_in_batch, 1)[0] + 1
          batch_logits, batch_labels = _get_batch_logits_and_labels(
              num_sequences, max_tokens_in_sequence, vocab_size
          )
          logits_train.append(batch_logits)
          labels_train.append(batch_labels)
  
      logits_test, labels_test = [], []
      for _ in range(n_test):
          num_sequences = np.random.choice(max_seq_in_batch, 1)[0] + 1
          batch_logits, batch_labels = _get_batch_logits_and_labels(
              num_sequences, max_tokens_in_sequence, vocab_size
          )
          logits_test.append(batch_logits)
          labels_test.append(batch_labels)
  
      return Seq2SeqAttackInputData(
          logits_train=iter(logits_train),
          logits_test=iter(logits_test),
          labels_train=iter(labels_train),
          labels_test=iter(labels_test),
          vocab_size=vocab_size,
          train_size=n_train,
          test_size=n_test,
      )
  
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 3 for calling a global function with example usage: get_seq2seq_test_input(n_train, n_test, max_seq_in_batch, max_tokens_in_sequence, vocab_size, seed) and returns: Seq2SeqAttackInputData