code: def test_modify_node_set_model_dir_and_image_name(
      retrieve_image_uri, boto_session
  ):
      boto_session.return_value.region_name = REGION_NAME
  
      tf_constructors = (
          "TensorFlow()",
          "TensorFlow(script_mode=False)",
          "TensorFlow(model_dir='s3//bucket/model')",
      )
      modifier = (
          tf_legacy_mode.TensorFlowLegacyModeConstructorUpgrader()
      )
  
      for constructor in tf_constructors:
          node = ast_call(constructor)
          modifier.modify_node(node)
  
          assert "TensorFlow(image_uri='{}', model_dir=False)".format(
              IMAGE_URI
          ) == pasta.dump(node)
          retrieve_image_uri.assert_called_with(
              "tensorflow",
              REGION_NAME,
              instance_type="ml.m4.xlarge",
              version="1.11.0",
              py_version="py2",
              image_scope="training",
          )
  
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 4 for calling a global function with example usage: test_modify_node_set_model_dir_and_image_name(retrieve_image_uri, boto_session) without return types