code: def test_parameter_string_with_enum_values():
      param = ParameterString("MyString", enum_values=["a", "b"])
      assert param.to_request() == {
          "Name": "MyString",
          "Type": "String",
          "EnumValues": ["a", "b"],
      }
      assert param.expr == {"Get": "Parameters.MyString"}
      assert param.parameter_type.python_type == str
  
      param = ParameterString(
          "MyString", default_value="a", enum_values=["a", "b"]
      )
      assert param.to_request() == {
          "Name": "MyString",
          "Type": "String",
          "DefaultValue": "a",
          "EnumValues": ["a", "b"],
      }
      assert param.expr == {"Get": "Parameters.MyString"}
      assert param.parameter_type.python_type == str
  
file_path: sagemaker-python-sdk/tests/unit/sagemaker/workflow/test_parameters.py
imports: from __future__ import absolute_import
  import pytest
  from sagemaker.workflow.parameters import ParameterBoolean, ParameterFloat, ParameterInteger, ParameterString
label_desc: Use image node_id 4 for calling a global function with example usage: test_parameter_string_with_enum_values() without return types