code: def test_node_should_be_modified_tf_constructor_legacy_mode():
      tf_legacy_mode_constructors = (
          "TensorFlow(script_mode=False)",
          "TensorFlow(script_mode=None)",
          "TensorFlow(py_version='py2')",
          "TensorFlow()",
          "sagemaker.tensorflow.TensorFlow(script_mode=False)",
          "sagemaker.tensorflow.TensorFlow(script_mode=None)",
          "sagemaker.tensorflow.TensorFlow(py_version='py2')",
          "sagemaker.tensorflow.TensorFlow()",
          "sagemaker.tensorflow.estimator.TensorFlow(script_mode=False)",
          "sagemaker.tensorflow.estimator.TensorFlow(script_mode=None)",
          "sagemaker.tensorflow.estimator.TensorFlow(py_version='py2')",
          "sagemaker.tensorflow.estimator.TensorFlow()",
      )
  
      modifier = (
          tf_legacy_mode.TensorFlowLegacyModeConstructorUpgrader()
      )
  
      for constructor in tf_legacy_mode_constructors:
          node = ast_call(constructor)
          assert modifier.node_should_be_modified(node) is True
  
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 1 for calling a global function with example usage: test_node_should_be_modified_tf_constructor_legacy_mode() without return types