def METHOD_NAME(make_stubber, secret_value, stages, error_code):
    secretsmanager_client = boto3.client('secretsmanager')
    secretsmanager_stubber = make_stubber(secretsmanager_client)
    secret = SecretsManagerSecret(secretsmanager_client)
    secret.name = 'test-name'
    secretsmanager_stubber.stub_put_secret_value(
        secret.name, secret_value, stages, error_code=error_code)
    if error_code is None:
        secret.put_value(secret_value, stages)
    else:
        with pytest.raises(ClientError) as exc_info:
            secret.put_value(secret_value, stages)
        assert exc_info.value.response['Error']['Code'] == error_code