code: def test_encode_decode(self, text, expected_ids):
      ids = self.encoder.encode(text)
      # Test ids match if ids provided
      if expected_ids:
          self.assertEqual(expected_ids, ids)
      # Test invertibility
      self.assertEqual(
          tf.compat.as_text(text), self.encoder.decode(ids)
      )
  
imports: from __future__ import unicode_literals
  import os
  from absl.testing import parameterized
  import tensorflow
  from tensorflow_datasets import testing
  from tensorflow_datasets.core import utils
  from tensorflow_datasets.core.deprecated.text import subword_text_encoder
  from tensorflow_datasets.core.deprecated.text import text_encoder
label_desc: Use image node_id 3 for calling the SubwordTextEncoderTest obj's underlying member method code with example usage: obj.test_encode_decode(text, expected_ids) without return types