def METHOD_NAME(make_stubber, error_code):
    ses_client = boto3.client('ses')
    ses_stubber = make_stubber(ses_client)
    ses_identity = SesIdentity(ses_client)
    email = 'test@example.com'
    ses_stubber.stub_get_identity_verification_attributes(
        [email], ['Success'], error_code=error_code)
    if error_code is None:
        ses_identity.wait_until_identity_exists(email)
    else:
        with pytest.raises(WaiterError):
            ses_identity.wait_until_identity_exists(email)