code: def test_StringOptions():
      # Test case of default conflicting with allowed options:
      test_options = ["one"]
      with pytest.raises(AssertionError):
          schema_utils.StringOptions(
              test_options, default=None, allow_none=False
          )
  
      # Test creating a schema with simple option, null not allowed:
      test_options = ["one"]
  
      @dataclass
      class CustomTestSchema(schema_utils.BaseMarshmallowConfig):
          foo: str = schema_utils.StringOptions(
              test_options, "one", allow_none=False
          )
  
      with pytest.raises(MarshmallowValidationError):
          CustomTestSchema.Schema().load({"foo": None})
  
file_path: ludwig/tests/ludwig/marshmallow/test_fields_misc.py
imports: from typing import Dict, Tuple, Union
  import pytest
  from marshmallow.exceptions import ValidationError
  from marshmallow_dataclass import dataclass
  from ludwig.config_validation.validation import get_validator, validate
  from ludwig.schema import utils
label_desc: Use image node_id 2 for calling a global function with example usage: test_StringOptions() without return types