code: def test_delete_lambda_client_error(sagemaker_session):
      lambda_obj = lambda_helper.Lambda(
          function_arn=LAMBDA_ARN, session=sagemaker_session
      )
  
      sagemaker_session.lambda_client.delete_function.side_effect = (
          ClientError(
              {
                  "Error": {
                      "Code": "Invalid",
                      "Message": "Delete failed",
                  }
              },
              "Invoke",
          )
      )
      with pytest.raises(ValueError) as error:
          lambda_obj.delete()
  
      assert "Delete failed" in str(error)
  
imports: from __future__ import print_function, absolute_import
  import os
  import pytest
  from mock import Mock, patch
  from botocore.exceptions import ClientError
  from sagemaker import lambda_helper
label_desc: Use image node_id 28 for calling a global function with example usage: test_delete_lambda_client_error(sagemaker_session) without return types