code: def test_constructor_modify_node():
      modifier = training_input.TrainingInputConstructorRefactor()
  
      node = ast_call("s3_input(s3_data='s3://a')")
      modifier.modify_node(node)
      assert "TrainingInput(s3_data='s3://a')" == pasta.dump(node)
  
      node = ast_call("sagemaker.s3_input(s3_data='s3://a')")
      modifier.modify_node(node)
      assert "sagemaker.TrainingInput(s3_data='s3://a')" == pasta.dump(
          node
      )
  
      node = ast_call("session.s3_input(s3_data='s3://a')")
      modifier.modify_node(node)
      assert "inputs.TrainingInput(s3_data='s3://a')" == pasta.dump(
          node
      )
  
      node = ast_call("inputs.s3_input(s3_data='s3://a')")
      modifier.modify_node(node)
      assert "inputs.TrainingInput(s3_data='s3://a')" == pasta.dump(
          node
      )
  
      node = ast_call("sagemaker.inputs.s3_input(s3_data='s3://a')")
      modifier.modify_node(node)
      assert (
          "sagemaker.inputs.TrainingInput(s3_data='s3://a')"
          == pasta.dump(node)
      )
  
      node = ast_call("sagemaker.session.s3_input(s3_data='s3://a')")
      modifier.modify_node(node)
      assert (
          "sagemaker.inputs.TrainingInput(s3_data='s3://a')"
          == pasta.dump(node)
      )
  
file_path: sagemaker-python-sdk/tests/unit/sagemaker/cli/compatibility/v2/modifiers/test_training_input.py
imports: from __future__ import absolute_import
  import pasta
  import pytest
  from sagemaker.cli.compatibility.v2.modifiers import training_input
  from tests.unit.sagemaker.cli.compatibility.v2.modifiers.ast_converter import ast_call, ast_import
label_desc: Use image node_id 5 for calling a global function with example usage: test_constructor_modify_node() without return types