def METHOD_NAME(group, user):
    user = Role.by_email(user)
    if user is None:
        user = Role.by_foreign_id(user)
    group = Role.by_foreign_id("group:{}".format(group))
    if user is not None and group is not None:
        user.add_role(group)
        db.session.commit()
        update_role(user)
    return user, group