def METHOD_NAME(fields: List[FieldSchema], name: Optional[str] = "FieldsSchema") -> BaseModel:
    """Generates a `pydantic.BaseModel` schema from a list of `FieldSchema` objects to validate
    the fields of a `FeedbackDataset` object before inserting them.
    Args:
        fields: the list of `FieldSchema` objects to generate the schema from.
        name: the name of the `pydantic.BaseModel` schema to generate. Defaults to "FieldsSchema".
    Returns:
        A `pydantic.BaseModel` schema to validate the fields of a `FeedbackDataset` object before
        inserting them.
    Raises:
        ValueError: if one of the fields has an unsupported type.
    Examples:
        >>> from argilla.client.feedback.schemas import TextField
        >>> from argilla.client.feedback.dataset import generate_pydantic_schema
        >>> fields = [
        ...     TextField(name="text", required=True),
        ...     TextField(name="label", required=True),
        ... ]
        >>> FieldsSchema = generate_pydantic_schema(fields)
        >>> FieldsSchema(text="Hello", label="World")
        FieldsSchema(text='Hello', label='World')
    """
    fields_schema = {}
    for field in fields:
        if field.settings["type"] not in FIELD_TYPE_TO_PYTHON_TYPE.keys():
            raise ValueError(
                f"Field {field.name} has an unsupported type: {field.settings['type']}, for the moment only the"
                f" following types are supported: {list(FIELD_TYPE_TO_PYTHON_TYPE.keys())}"
            )
        fields_schema.update(
            {field.name: (FIELD_TYPE_TO_PYTHON_TYPE[field.settings["type"]], ... if field.required else None)}
        )
    return create_model(name, **fields_schema)