<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def save(f, arr, vocab):
 """ Save word embedding file. Args: f (File):
 File to write the vectors. File should be open for writing ascii. arr (numpy.array):
 Numpy array with ``float`` dtype. vocab (iterable):
 Each element is pair of a word (``bytes``) and ``arr`` index (``int``). Word should be encoded to str apriori. """

    itr = iter(vocab)
    # Avoid empty line at the end
    word, idx = next(itr)
    _write_line(f, arr[idx], word)
    for word, idx in itr:
        f.write(b'\n')
        _write_line(f, arr[idx], word)