from typing import Dict
from typing import List


def convert_by_vocab(vocab: Dict, items: List) -> List:
    """Converts a sequence of [tokens|ids] using the vocab."""
    output = []
    for item in items:
        output.append(vocab[item])
    return output