<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_migration(plugin, filename):
    '''Get an existing migration record if exists'''
    db = get_db()
    return db.migrations.find_one({'plugin': plugin, 'filename': filename})