def author(**kwargs):
    if 'name' not in kwargs:
        kwargs['name'] = ' '.join(get_sentences(1)[0].split(' ')[0:2])
    if 'email' not in kwargs:
        kwargs['email'] = '{0}@example.com'.format(slugify(kwargs['name']))
    try:
        result = Author.query.filter_by(email=kwargs['email'])[0]
    except __HOLE__:
        result = Author(**kwargs)
        db.session.add(result)
    return result
dataset/ETHPy150Open dropbox/changes/changes/mock.py/author