<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def last(self, size=1):
 """ Declares a slding window containing most recent tuples on this stream. The number of tuples maintained in the window is defined by `size`. If `size` is an `int` then it is the count of tuples in the window. For example, with ``size=10`` the window always contains the last (most recent) ten tuples. If `size` is an `datetime.timedelta` then it is the duration of the window. With a `timedelta` representing five minutes then the window contains any tuples that arrived in the last five minutes. Args: size: The size of the window, either an `int` to define the number of tuples or `datetime.timedelta` to define the duration of the window. Examples:: # Create a window against stream s of the last 100 tuples w = s.last(size=100) :: # Create a window against stream s of tuples # arrived on the stream in the last five minutes w = s.last(size=datetime.timedelta(minutes=5)) Returns: Window: Window of the last (most recent) tuples on this stream. """

        win = Window(self, 'SLIDING')
        if isinstance(size, datetime.timedelta):
            win._evict_time(size)
        elif isinstance(size, int):
            win._evict_count(size)
        else:
            raise ValueError(size)
        return win