def METHOD_NAME(self, user_id=None, email=None):
    """Helper function for creating a test user."""
    registration = getToolByName(self.portal, "portal_registration", None)
    registration.addMember(
        user_id,
        "password",
        ["Member"],
        properties={"email": email, "username": user_id},
    )
    membership = getToolByName(self.portal, "portal_membership", None)
    return membership.getMemberById(user_id)