def METHOD_NAME(vocab, num_oov=1):
    init = tf.lookup.KeyValueTensorInitializer(
        vocab,
        tf.range(tf.size(vocab, out_type=tf.int64), dtype=tf.int64),
        key_dtype=tf.string,
        value_dtype=tf.int64,
        name="hasht")
    return lookup_ops.StaticVocabularyTable(
        init, num_oov, lookup_key_dtype=tf.string)