def text_frame(self):
        """Builds and returns the text frame to be rendered
        Returns
        -------
        self
        """
        if len(self._text["frames"]) == 1:
            if self._text_color:
                return colored_frame(self._text["frames"][0], self._text_color)

            # Return first frame (can't return original text because at this point it might be ellipsed)
            return self._text["frames"][0]

        frames = self._text["frames"]
        frame = frames[self._text_index]

        self._text_index += 1
        self._text_index = self._text_index % len(frames)

        if self._text_color:
            return colored_frame(frame, self._text_color)

        return frame
Builds and returns the text frame to be rendered
        Returns
        -------
        self
        
halo/halo.py