<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def convert(outputfile, inputfile, to_format, from_format):
 """ Convert pretrained word embedding file in one format to another. """

    emb = word_embedding.WordEmbedding.load(
        inputfile, format=_input_choices[from_format][1],
        binary=_input_choices[from_format][2])
    emb.save(outputfile, format=_output_choices[to_format][1],
             binary=_output_choices[to_format][2])