code: def test_update_lambda_client_error(sagemaker_session):
      lambda_obj = lambda_helper.Lambda(
          function_name=FUNCTION_NAME,
          execution_role_arn=EXECUTION_ROLE,
          script=SCRIPT,
          handler=HANDLER,
          session=sagemaker_session,
      )
  
      sagemaker_session.lambda_client.update_function_code.side_effect = ClientError(
          {
              "Error": {
                  "Code": "InvalidCodeException",
                  "Message": "Cannot update code",
              }
          },
          "UpdateFunction",
      )
      with pytest.raises(ValueError) as error:
          lambda_obj.update()
  
      assert "Cannot update code" 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 21 for calling a global function with example usage: test_update_lambda_client_error(sagemaker_session) without return types