Outputs the last `num` elements that were appended either by `append` or
        `append_multiple`.

        Returns
        -------
        out : list

def read_history(self, num=10, segment=0):
        """
        Outputs the last `num` elements that were appended either by `append` or
        `append_multiple`.

        Returns
        -------
        out : list

        """
        if num < 0:
            num = 0
        if segment < 0:
            raise TypeError("segment must be >= 0")
        return self._builder.read_history(num, segment)