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