<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def window(self, begin, end=None):
 """ Return a new Table limited to the rows added to this Table during the specified time range. Args: begin: the start time of the window. This can be a Python datetime (absolute) or timedelta (relative to current time). The result must be after the table was created and no more than seven days in the past. Note that using a relative value will provide a varying snapshot, not a fixed snapshot; any queries issued against such a Table will be done against a snapshot that has an age relative to the execution time of the query. end: the end time of the snapshot; if None, then the current time is used. The types and interpretation of values is as for start. Returns: A new Table object referencing the window. Raises: An exception if this Table is already decorated, or if the time specified is invalid. """

    if self._name_parts.decorator != '':
      raise Exception("Cannot use window() on an already decorated table")

    start = Table._convert_decorator_time(begin)
    if end is None:
      if isinstance(begin, datetime.timedelta):
        end = datetime.timedelta(0)
      else:
        end = datetime.datetime.utcnow()
    stop = Table._convert_decorator_time(end)

    # Both values must have the same sign
    if (start > 0 >= stop) or (stop > 0 >= start):
      raise Exception("window: Between arguments must both be absolute or relative: %s, %s" %
                      (str(begin), str(end)))

    # start must be less than stop
    if start > stop:
      raise Exception("window: Between arguments: begin must be before end: %s, %s" %
                      (str(begin), str(end)))

    return Table("%s@%s-%s" % (self._full_name, str(start), str(stop)), context=self._context)