def frame(self):
        """Builds and returns the frame to be rendered
        Returns
        -------
        self
        """
        frames = self._spinner["frames"]
        frame = frames[self._frame_index]

        if self._color:
            frame = colored_frame(frame, self._color)

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

        text_frame = self.text_frame()
        return "{0} {1}".format(
            *[
                (text_frame, frame)
                if self._placement == "right"
                else (frame, text_frame)
            ][0]
        )
Builds and returns the frame to be rendered
        Returns
        -------
        self
        
halo/halo.py