code: def test_run_seq2seq_attack_calculates_correct_metadata(self):
      attack_input = Seq2SeqAttackInputData(
          logits_train=iter(
              [
                  np.array(
                      [
                          np.array(
                              [[0.1, 0.1, 0.8], [0.7, 0.3, 0]],
                              dtype=np.float32,
                          ),
                          np.array([[0.4, 0.5, 0.1]], dtype=np.float32),
                      ],
                      dtype=object,
                  ),
                  np.array(
                      [
                          np.array(
                              [[0.25, 0.6, 0.15], [1, 0, 0]],
                              dtype=np.float32,
                          )
                      ],
                      dtype=object,
                  ),
                  np.array(
                      [
                          np.array(
                              [[0.9, 0, 0.1], [0.25, 0.5, 0.25]],
                              dtype=np.float32,
                          ),
                          np.array(
                              [[0, 1, 0], [0.2, 0.1, 0.7]],
                              dtype=np.float32,
                          ),
                      ],
                      dtype=object,
                  ),
                  np.array(
                      [
                          np.array(
                              [[0.9, 0, 0.1], [0.25, 0.5, 0.25]],
                              dtype=np.float32,
                          ),
                          np.array(
                              [[0, 1, 0], [0.2, 0.1, 0.7]],
                              dtype=np.float32,
                          ),
                      ],
                      dtype=object,
                  ),
              ]
          ),
          logits_test=iter(
              [
                  np.array(
                      [
                          np.array(
                              [[0.25, 0.4, 0.35], [0.2, 0.4, 0.4]],
                              dtype=np.float32,
                          )
                      ],
                      dtype=object,
                  ),
                  np.array(
                      [
                          np.array(
                              [[0.3, 0.3, 0.4], [0.4, 0.4, 0.2]],
                              dtype=np.float32,
                          ),
                          np.array(
                              [[0.3, 0.35, 0.35]], dtype=np.float32
                          ),
                      ],
                      dtype=object,
                  ),
                  np.array(
                      [
                          np.array(
                              [[0.25, 0.4, 0.35], [0.2, 0.4, 0.4]],
                              dtype=np.float32,
                          )
                      ],
                      dtype=object,
                  ),
                  np.array(
                      [
                          np.array(
                              [[0.25, 0.4, 0.35], [0.2, 0.4, 0.4]],
                              dtype=np.float32,
                          )
                      ],
                      dtype=object,
                  ),
              ]
          ),
          labels_train=iter(
              [
                  np.array(
                      [
                          np.array([2, 0], dtype=np.float32),
                          np.array([1], dtype=np.float32),
                      ],
                      dtype=object,
                  ),
                  np.array(
                      [np.array([1, 0], dtype=np.float32)], dtype=object
                  ),
                  np.array(
                      [
                          np.array([0, 1], dtype=np.float32),
                          np.array([1, 2], dtype=np.float32),
                      ],
                      dtype=object,
                  ),
                  np.array(
                      [
                          np.array([0, 0], dtype=np.float32),
                          np.array([0, 1], dtype=np.float32),
                      ],
                      dtype=object,
                  ),
              ]
          ),
          labels_test=iter(
              [
                  np.array([np.array([2, 1], dtype=np.float32)]),
                  np.array(
                      [
                          np.array([2, 0], dtype=np.float32),
                          np.array([1], dtype=np.float32),
                      ],
                      dtype=object,
                  ),
                  np.array([np.array([2, 1], dtype=np.float32)]),
                  np.array([np.array([2, 1], dtype=np.float32)]),
              ]
          ),
          vocab_size=3,
          train_size=4,
          test_size=4,
      )
      result = run_seq2seq_attack(
          attack_input, balance_attacker_training=False
      )
      metadata = result.privacy_report_metadata
      np.testing.assert_almost_equal(
          metadata.loss_train, 0.91, decimal=2
      )
      np.testing.assert_almost_equal(
          metadata.loss_test, 1.58, decimal=2
      )
      np.testing.assert_almost_equal(
          metadata.accuracy_train, 0.77, decimal=2
      )
      np.testing.assert_almost_equal(
          metadata.accuracy_test, 0.67, decimal=2
      )
  
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 4 for calling the RunSeq2SeqAttackTest obj's underlying member method code with example usage: obj.test_run_seq2seq_attack_calculates_correct_metadata() without return types