class_docstr: A wrapper around the output of the tf.Transform.
docstr: Like vocabulary_file_by_name but returns a list.
docstr_tok: ["Like","vocabulary_file_by_name","but","returns","a","list","."]
code: def vocabulary_by_name(self, vocab_filename: str) -> List[bytes]:
      """Like vocabulary_file_by_name but returns a list."""
      vocab_path = self.vocabulary_file_by_name(vocab_filename)
      if not vocab_path:
          raise ValueError(
              "Could not read vocabulary: {}, does not exist".format(
                  vocab_filename
              )
          )
      elif vocab_path.endswith("tfrecord.gz"):
          dataset = tf.data.TFRecordDataset(
              vocab_path, compression_type="GZIP"
          )
          vocab_tensor = dataset.batch(tf.int32.max).reduce(
              tf.constant([], dtype=tf.string),
              lambda state, elem: tf.concat([state, elem], axis=-1),
          )
          # Using as_numpy_iterator only works when executing eagerly.
          return _get_tensor_value(vocab_tensor).tolist()
      else:
          with tf.io.gfile.GFile(vocab_path, "rb") as f:
              return [l.rstrip(os.linesep.encode("utf-8")) for l in f]
  
imports: import json
  import os
  from typing import Any, Dict, List, Mapping, Optional
  import numpy
  import tensorflow
  from tensorflow_transform import common
  from tensorflow_transform import common_types
  from tensorflow_transform import graph_tools
  from tensorflow_transform.analyzers import sanitized_vocab_filename
  from tensorflow_transform.keras_lib import tf_keras
  from tensorflow_transform.saved import saved_transform_io
  from tensorflow_transform.saved import saved_transform_io_v2
  from tensorflow_transform.tf_metadata import dataset_metadata
  from tensorflow_transform.tf_metadata import metadata_io
  from tensorflow_transform.tf_metadata import schema_utils
  from tensorflow.python.framework import ops
  from tensorflow.tools.docs import doc_controls
  from tensorflow_metadata.proto.v0 import schema_pb2
label_desc: Use image node_id 11 for calling the TFTransformOutput obj's underlying member method code with example usage: obj.vocabulary_by_name(vocab_filename) and returns: _get_tensor_value, unknown