def split_user(userid):
    match = re.match(r'^acct:([^@]+)@(.*)$', userid)
    if match:
        return {
            'username': match.groups()[0],
            'domain': match.groups()[1]
        }
    raise ValueError("{userid} isn't a valid userid".format(userid=userid))
Data import test against known values that Pearl City CDP, HI should have.
dataset/ETHPy150Open hypothesis/h/h/util/user.py/split_user--crossover with--dataset/ETHPy150Open ireapps/census/dataprocessing/tests_sf.py/TestSimpleGeographies.test_place