Trims old messages from a stream.
        name: name of the stream.
        maxlen: truncate old stream messages beyond this size
        approximate: actual stream length may be slightly more than maxlen

def xtrim(self, name, maxlen, approximate=True):
        """
        Trims old messages from a stream.
        name: name of the stream.
        maxlen: truncate old stream messages beyond this size
        approximate: actual stream length may be slightly more than maxlen
        """
        pieces = [Token.get_token('MAXLEN')]
        if approximate:
            pieces.append(Token.get_token('~'))
        pieces.append(maxlen)
        return self.execute_command('XTRIM', name, *pieces)