def METHOD_NAME(make_stubber, error_code):
    apigateway_client = boto3.client('apigateway')
    apigateway_stubber = make_stubber(apigateway_client)
    api_gtos = ApiGatewayToService(apigateway_client)
    api_gtos.api_id = 'test-api-id'
    apigateway_stubber.stub_delete_rest_api(api_gtos.api_id, error_code=error_code)
    if error_code is None:
        api_gtos.delete_rest_api()
    else:
        with pytest.raises(ClientError) as exc_info:
            api_gtos.delete_rest_api()
        assert exc_info.value.response['Error']['Code'] == error_code