code: def test_seal_and_open(self, run_eagerly, m, dtype, dtype_size):
      context = tf_execution_context(run_eagerly)
      with context.scope():
          pk_s, sk_s = easy_box.gen_keypair()
          pk_r, sk_r = easy_box.gen_keypair()
  
          plaintext = tf.constant(m, dtype=dtype)
  
          nonce = easy_box.gen_nonce()
          ciphertext, mac = easy_box.seal_detached(
              plaintext, nonce, pk_r, sk_s
          )
  
          plaintext_recovered = easy_box.open_detached(
              ciphertext, mac, nonce, pk_s, sk_r, plaintext.dtype
          )
  
      assert isinstance(ciphertext, easy_box.Ciphertext)
      assert isinstance(ciphertext.raw, tf.Tensor)
      assert ciphertext.raw.dtype == tf.uint8
      assert ciphertext.raw.shape == plaintext.shape + (dtype_size,)
  
      assert isinstance(mac, easy_box.Mac)
      assert isinstance(mac.raw, tf.Tensor)
      assert mac.raw.dtype == tf.uint8
      assert mac.raw.shape == (16,)
  
      assert isinstance(plaintext_recovered, tf.Tensor)
      assert plaintext_recovered.dtype == plaintext.dtype
      assert plaintext_recovered.shape == plaintext.shape
  
      plaintext_recovered = context.evaluate(plaintext_recovered)
      np.testing.assert_equal(plaintext_recovered, np.array(m))
  
file_path: tf-encrypted/primitives/tf_encrypted/primitives/sodium/python/easy_box_test.py
imports: import unittest
  import numpy
  import tensorflow
  from absl.testing import parameterized
  from tf_encrypted.primitives.sodium.python import easy_box
  from tf_encrypted.test import tf_execution_context
label_desc: Use image node_id 3 for calling the TestEasyBox obj's underlying member method code with example usage: obj.test_seal_and_open(run_eagerly, m, dtype, dtype_size) without return types