def METHOD_NAME(tmp_dir, name="vocab", size=10):
    vocab = opennmt.data.Vocab()
    for i in range(size):
        vocab.add(str(i))
    vocab_path = str(tmp_dir.join("%s.txt" % name))
    vocab.serialize(vocab_path)
    return vocab_path