<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_specs(data):
 """ Takes a magic format file and returns a list of unique specimen names """

    # sort the specimen names
    speclist = []
    for rec in data:
        try:
            spec = rec["er_specimen_name"]
        except KeyError as e:
            spec = rec["specimen"]
        if spec not in speclist:
            speclist.append(spec)
    speclist.sort()
    return speclist