def METHOD_NAME():
    class HobbyInputModel(pydantic.BaseModel):
        name: pydantic.constr(min_length=2)
    class CreateUserModel(pydantic.BaseModel):
        hobby: HobbyInputModel
    @strawberry.experimental.pydantic.input(HobbyInputModel)
    class HobbyInput:
        name: strawberry.auto
    @strawberry.experimental.pydantic.input(CreateUserModel)
    class CreateUserInput:
        hobby: strawberry.auto
    class UserModel(pydantic.BaseModel):
        name: str
    @strawberry.experimental.pydantic.type(UserModel)
    class UserType:
        name: strawberry.auto
    @strawberry.type
    class Query:
        h: str
    @strawberry.type
    class Mutation:
        @strawberry.mutation
        def create_user(self, input: CreateUserInput) -> UserType:
            data = input.to_pydantic()
            return UserType(name=data.name)
    schema = strawberry.Schema(query=Query, mutation=Mutation)
    query = """
        mutation {
            createUser(input: { hobby: { name: "P" } }) {
                name
            }
        }
    """
    result = schema.execute_sync(query)
    if IS_PYDANTIC_V2:
        assert result.errors[0].message == (
            "1 validation error for HobbyInputModel\n"
            "name\n"
            "  String should have at least 2 characters [type=string_too_short, "
            "input_value='P', input_type=str]\n"
            "    For further information visit "
            "https://errors.pydantic.dev/2.0.3/v/string_too_short"
        )
    else:
        assert result.errors[0].message == (
            "1 validation error for HobbyInputModel\nname\n"
            "  ensure this value has at least 2 characters "
            "(type=value_error.any_str.min_length; limit_value=2)"
        )