code: def test_attach_wrong_framework(sagemaker_session):
      returned_job_description = {
          "AlgorithmSpecification": {
              "TrainingInputMode": "File",
              "TrainingImage": "1.dkr.ecr.us-west-2.amazonaws.com/sagemaker-mxnet-py2-cpu:1.0",
          },
          "HyperParameters": {
              "sagemaker_submit_directory": '"s3://some/sourcedir.tar.gz"',
              "sagemaker_program": '"iris-dnn-classifier.py"',
              "sagemaker_container_log_level": '"logging.INFO"',
          },
          "RoleArn": "arn:aws:iam::366:role/SageMakerRole",
          "ResourceConfig": {
              "VolumeSizeInGB": 30,
              "InstanceCount": 1,
              "InstanceType": "ml.c4.xlarge",
          },
          "StoppingCondition": {"MaxRuntimeInSeconds": 24 * 60 * 60},
          "TrainingJobName": "neo",
          "TrainingJobStatus": "Completed",
          "TrainingJobArn": "arn:aws:sagemaker:us-west-2:336:training-job/neo",
          "OutputDataConfig": {
              "KmsKeyId": "",
              "S3OutputPath": "s3://place/output/neo",
          },
          "TrainingJobOutput": {
              "S3TrainingJobOutput": "s3://here/output.tar.gz"
          },
      }
      sagemaker_session.sagemaker_client.describe_training_job = Mock(
          name="describe_training_job",
          return_value=returned_job_description,
      )
  
      with pytest.raises(ValueError) as error:
          TensorFlow.attach(
              training_job_name="neo",
              sagemaker_session=sagemaker_session,
          )
      assert "didn't use image for requested framework" in str(error)
  
file_path: sagemaker-python-sdk/tests/unit/sagemaker/tensorflow/test_estimator_attach.py
imports: from __future__ import absolute_import
  import pytest
  from mock import MagicMock, Mock, patch
  from packaging.version import Version
  from sagemaker import image_uris
  from sagemaker.tensorflow import TensorFlow
label_desc: Use image node_id 4 for calling a global function with example usage: test_attach_wrong_framework(sagemaker_session) without return types