def METHOD_NAME(loadtest_factor, is_demo_user):
    domain_name = 'test-domain'
    domain_obj = create_domain(domain_name)
    just_now = datetime.utcnow().isoformat(timespec='seconds') + 'Z'
    user = CommCareUser.wrap({
        'domain': domain_name,
        'username': f'testy@{domain_name}.commcarehq.org',
        'loadtest_factor': loadtest_factor,
        'is_demo_user': is_demo_user,
        'user_data': {},
        'date_joined': just_now,
    })
    user.save()
    try:
        yield user
    finally:
        user.delete(domain_name, None)
        domain_obj.delete()