def _get_field_by_type(field_type: str) -> "TextField":
    """Get the field type from the field type string."""
    from argilla import TextField, ImageField

    FIELD_MAPPING = {
        "text": TextField,
        "image": ImageField,
    }

    return FIELD_MAPPING[field_type]
Get the field type from the field type string.
argilla/src/argilla/settings/_templates.py