code: def test_modify_node_prefer_param_over_hyperparameter(
      retrieve_image_uri,
  ):
      tf_constructor = """sagemaker.tensorflow.TensorFlow(
          training_steps=100,
          requirements_file='source/requirements.txt',
          hyperparameters={'training_steps': 10, 'sagemaker_requirements': 'foo.txt'},
      )"""
  
      node = ast_call(tf_constructor)
      modifier = (
          tf_legacy_mode.TensorFlowLegacyModeConstructorUpgrader()
      )
      modifier.modify_node(node)
  
      expected_hyperparameters = {
          "sagemaker_requirements": "source/requirements.txt",
          "training_steps": 100,
      }
  
      assert expected_hyperparameters == _hyperparameters_from_node(
          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 8 for calling a global function with example usage: test_modify_node_prefer_param_over_hyperparameter(retrieve_image_uri) without return types