<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def convert2phylip(convert):
 """ convert fasta to phylip because RAxML is ridiculous """

    out = '%s.phy' % (convert.rsplit('.', 1)[0])
    if check(out) is False:
        convert = open(convert, 'rU')
        out_f = open(out, 'w')
        alignments = AlignIO.parse(convert, "fasta")
        AlignIO.write(alignments, out, "phylip")
    return out