code: def test_OneOfOptionsField_allows_none_one_field_allows_none():
      @dataclass
      class CustomTestSchema(schema_utils.BaseMarshmallowConfig):
          foo: Union[float, str] = schema_utils.OneOfOptionsField(
              default=None,
              description="",
              field_options=[
                  schema_utils.PositiveInteger(
                      description="", default=1, allow_none=False
                  ),
                  schema_utils.List(list_type=int, allow_none=True),
              ],
          )
  
      json = schema_utils.unload_jsonschema_from_marshmallow_class(
          CustomTestSchema
      )
      schema = {
          "type": "object",
          "properties": {
              "hello": json,
          },
          "definitions": {},
      }
      validate(
          instance={"hello": {"foo": None}},
          schema=schema,
          cls=get_validator(),
      )
  
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 9 for calling a global function with example usage: test_OneOfOptionsField_allows_none_one_field_allows_none() without return types