def METHOD_NAME(make_stubber, error_code):
    ses_client = boto3.client('ses')
    ses_stubber = make_stubber(ses_client)
    ses_template = SesTemplate(ses_client)
    template_names = [f'test-template-{index}' for index in range(4)]
    ses_stubber.stub_list_templates(template_names, error_code=error_code)
    if error_code is None:
        got_template_metas = ses_template.list_templates()
        assert got_template_metas == [
            {'Name': meta['Name']} for meta in got_template_metas]
    else:
        with pytest.raises(ClientError) as exc_info:
            ses_template.list_templates()
        assert exc_info.value.response['Error']['Code'] == error_code