def METHOD_NAME(tokens, vocab):
    """Converts a token id (or a sequence of id) in a token string
    (or a sequence of tokens), using the vocabulary.
    """
    ids = []
    unk_id = vocab.get("[UNK]", None)
    for token in tokens:
        wid = vocab.get(token, unk_id)
        if wid:
            ids.append(wid)
    return ids