langchain/callbacks/comet_ml_callback.py/CometCallbackHandler/_get_complexity_metrics
class CometCallbackHandler:    def _get_complexity_metrics(self, text: str) -> dict:
        """Compute text complexity metrics using textstat.

        Parameters:
            text (str): The text to analyze.

        Returns:
            (dict): A dictionary containing the complexity metrics.
        """
        resp = {}
        if self.complexity_metrics:
            text_complexity_metrics = _fetch_text_complexity_metrics(text)
            resp.update(text_complexity_metrics)

        return resp