

def retrieve_user_from_linkedin(response):
    auth_id = ('linkedin_%s' % response['id'])
    user_db = model.User.get_by('auth_ids', auth_id)
    if user_db:
        return user_db
    names = [response.get('firstName', ''), response.get('lastName', '')]
    name = ' '.join(names).strip()
    email = response.get('emailAddress', '')
    return auth.create_user_db(auth_id=auth_id, name=name, username=(email or name), email=email, verified=bool(email))

dataset/ETHPy150Open gae-init/gae-init-debug/main/auth/linkedin.py retrieve_user_from_linkedin/original