code: def test_modify_node_set_image_name_from_args(
      retrieve_image_uri, boto_session
  ):
      boto_session.return_value.region_name = REGION_NAME
  
      tf_constructor = "TensorFlow(train_instance_type='ml.p2.xlarge', framework_version='1.4.0')"
  
      node = ast_call(tf_constructor)
      modifier = (
          tf_legacy_mode.TensorFlowLegacyModeConstructorUpgrader()
      )
      modifier.modify_node(node)
  
      retrieve_image_uri.assert_called_with(
          "tensorflow",
          REGION_NAME,
          instance_type="ml.p2.xlarge",
          version="1.4.0",
          py_version="py2",
          image_scope="training",
      )
  
      expected_string = (
          "TensorFlow(train_instance_type='ml.p2.xlarge', framework_version='1.4.0', "
          "image_uri='{}', model_dir=False)".format(IMAGE_URI)
      )
      assert expected_string == pasta.dump(node)
  
file_path: sagemaker-python-sdk/tests/unit/sagemaker/cli/compatibility/v2/modifiers/test_tf_legacy_mode.py
imports: from __future__ import absolute_import
  import pasta
  from mock import MagicMock, patch
  from sagemaker.cli.compatibility.v2.modifiers import tf_legacy_mode
  from tests.unit.sagemaker.cli.compatibility.v2.modifiers.ast_converter import ast_call
label_desc: Use image node_id 5 for calling a global function with example usage: test_modify_node_set_image_name_from_args(retrieve_image_uri, boto_session) without return types