code: def testJointVocabularyForMultipleFeatures(self):
      input_data = [
          {"a": "hello", "b": "world", "c": "aaaaa"},
          {"a": "good", "b": "", "c": "hello"},
          {"a": "goodbye", "b": "hello", "c": "\n"},
          {"a": " ", "b": "aaaaa", "c": "bbbbb"},
      ]
      input_metadata = tft.DatasetMetadata.from_feature_spec(
          {
              "a": tf.io.FixedLenFeature([], tf.string),
              "b": tf.io.FixedLenFeature([], tf.string),
              "c": tf.io.FixedLenFeature([], tf.string),
          }
      )
      vocab_filename = "test_compute_and_apply_vocabulary"
  
      def preprocessing_fn(inputs):
          deferred_vocab_and_filename = tft.vocabulary(
              tf.concat([inputs["a"], inputs["b"], inputs["c"]], 0),
              vocab_filename=vocab_filename,
              file_format=self._VocabFormat(),
          )
          return {
              "index_a": tft.apply_vocabulary(
                  inputs["a"],
                  deferred_vocab_and_filename,
                  file_format=self._VocabFormat(),
              ),
              "index_b": tft.apply_vocabulary(
                  inputs["b"],
                  deferred_vocab_and_filename,
                  file_format=self._VocabFormat(),
              ),
          }
  
      expected_vocab = [
          b"hello",
          b"aaaaa",
          b"world",
          b"goodbye",
          b"good",
          b"bbbbb",
          b" ",
          b"\n",
          b"",
      ]
      empty_index = len(expected_vocab) - 1
      if self._VocabFormat() == "text":
          expected_vocab = expected_vocab[:-2]
          empty_index = -1
      max_index = len(expected_vocab) - 1
      expected_data = [
          # For tied frequencies, larger (lexicographic) items come first.
          {"index_a": 0, "index_b": 2},  # hello  # world
          {"index_a": 4, "index_b": empty_index},  # good  # ''
          {"index_a": 3, "index_b": 0},  # goodbye  # hello
          {"index_a": 6, "index_b": 1},  # ' '  # aaaaa
      ]
      expected_metadata = tft.DatasetMetadata.from_feature_spec(
          {
              "index_a": tf.io.FixedLenFeature([], tf.int64),
              "index_b": tf.io.FixedLenFeature([], tf.int64),
          },
          {
              "index_a": schema_pb2.IntDomain(
                  min=-1, max=max_index, is_categorical=True
              ),
              "index_b": schema_pb2.IntDomain(
                  min=-1, max=max_index, is_categorical=True
              ),
          },
      )
      self.assertAnalyzeAndTransformResults(
          input_data,
          input_metadata,
          preprocessing_fn,
          expected_data,
          expected_metadata,
          expected_vocab_file_contents={vocab_filename: expected_vocab},
      )
  
imports: import os
  import apache_beam
  import tensorflow
  import tensorflow_transform
  from tensorflow_transform.beam import analyzer_impls
  from tensorflow_transform.beam import impl
  from tensorflow_transform.beam.tft_beam_io import transform_fn_io
  from tensorflow_transform.beam import tft_unit
  from tensorflow_metadata.proto.v0 import schema_pb2
label_desc: Use image node_id 7 for calling the VocabularyIntegrationTest obj's underlying member method code with example usage: obj.testJointVocabularyForMultipleFeatures() and returns: dict