def METHOD_NAME():
    class MyModel(BaseModel):
        root: str
        # Note that the following three definitions require no changes across all __root__ models
        # I couldn't see a nice way to create a decorator that reduces the boilerplate,
        # but if we want to discourage this pattern, perhaps that's okay?
        @model_validator(mode='before')
        @classmethod
        def populate_root(cls, values):
            return {'root': values}
        @model_serializer(mode='wrap')
        def _serialize(self, handler, info):
            data = handler(self)
            if info.mode == 'json':
                return data['root']
            else:
                return data
        @classmethod
        def __get_pydantic_json_schema__(
            cls, core_schema: CoreSchema, handler: GetJsonSchemaHandler
        ) -> JsonSchemaValue:
            json_schema = handler(core_schema)
            root = handler.resolve_ref_schema(json_schema)['properties']['root']
            return root
    # Validation
    m = MyModel.model_validate('a')
    assert m.root == 'a'
    # Serialization
    assert m.model_dump() == {'root': 'a'}
    assert m.model_dump_json() == '"a"'
    # JSON schema
    assert m.model_json_schema() == {'title': 'Root', 'type': 'string'}