code: def test_invoke_lambda_client_error(sagemaker_session):
      lambda_obj = lambda_helper.Lambda(
          function_arn=LAMBDA_ARN, session=sagemaker_session
      )
  
      sagemaker_session.lambda_client.invoke.side_effect = ClientError(
          {
              "Error": {
                  "Code": "InvalidCodeException",
                  "Message": "invoke failed",
              }
          },
          "Invoke",
      )
      with pytest.raises(ValueError) as error:
          lambda_obj.invoke()
  
      assert "invoke 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 26 for calling a global function with example usage: test_invoke_lambda_client_error(sagemaker_session) without return types