code: def test_Embed():
      # Test metadata matches expected defaults after field creation (null allowed):
      default_embed = get_marshmallow_from_dataclass_field(
          schema_utils.Embed()
      )
      assert default_embed.default is None
      assert default_embed.allow_none is True
  
      # Test simple schema creation:
      @dataclass
      class CustomTestSchema(schema_utils.BaseMarshmallowConfig):
          foo: Union[None, str, int] = schema_utils.Embed()
  
      # Test null/empty loading cases:
      assert CustomTestSchema.Schema().load({}).foo is None
      assert CustomTestSchema.Schema().load({"foo": None}).foo is None
  
      # Test valid strings/numbers:
      with pytest.raises(MarshmallowValidationError):
          CustomTestSchema.Schema().load({"foo": "not_add"})
  
      with pytest.raises(MarshmallowValidationError):
          CustomTestSchema.Schema().load({"foo": {}})
  
      assert CustomTestSchema.Schema().load({"foo": "add"}).foo == "add"
      assert CustomTestSchema.Schema().load({"foo": 1}).foo == 1
  
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 3 for calling a global function with example usage: test_Embed() without return types