def expand_unknown_vocab(line, vocab):
    """
    Treat the words that are in the "line" but not in the "vocab" as unknows,
    and expand the characters in those words as individual words.
    For example, the word "Spoon" is in "line" but not in "vocab", it will be
    expanded as "<S> <p> <o> <o> <n>".
    """
    ts = set(line.split(' '))
    unknowns = ts
    unknowns -= set(vocab)
    unknowns -= set([''])

    for t in unknowns:
        spaced = ''.join([f"<{c}> " for c in t])
        line = line.replace(t, spaced)

    return line