def _cast_classlabels_as_strings(hf_dataset: "HFDataset", columns: List[str]) -> "HFDataset":
    """Cast the class label features in the Hugging Face dataset as strings.

    Parameters:
        hf_dataset (HFDataset): The Hugging Face dataset to cast.
        columns (List[str]): The names of the columns containing the class label features.

    Returns:
        HFDataset: The Hugging Face dataset with class label features cast as strings.
    """

    def label_column2str(x: dict, column: str, features: dict) -> Dict[str, Union[str, None]]:
        value = x[column]
        feature = features[column]

        value = _int2class_name(feature, value)
        return {column: value}

    for column in columns:
        features = hf_dataset.features.copy()
        features[column] = Value("string")
        hf_dataset = hf_dataset.map(
            label_column2str, fn_kwargs={"column": column, "features": hf_dataset.features}, features=features
        )

    return hf_dataset
Cast the class label features in the Hugging Face dataset as strings.

    Parameters:
        hf_dataset (HFDataset): The Hugging Face dataset to cast.
        columns (List[str]): The names of the columns containing the class label features.

    Returns:
        HFDataset: The Hugging Face dataset with class label features cast as strings.
    
argilla/src/argilla/records/_io/_datasets.py