<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def set_expiration(self, key, ignore_missing=False,
            additional_seconds=None, seconds=None):
        '''
        Alters the expiration time for a key. If the key is not
        present, then raise an Exception unless `ignore_missing`
        is set to `True`.

        Args:
            key: The key whose expiration we are changing.
            ignore_missing (bool): If set, then return silently
                if the key does not exist. Default is `False`.
            additional_seonds (int): Add this many seconds to the
                current expiration time.
            seconds (int): Expire the key this many seconds from now.
        '''
        if key not in self.time_dict and ignore_missing:
            return
        elif key not in self.time_dict and not ignore_missing:
            raise Exception('Key missing from `TimedDict` and '
                '`ignore_missing` is False.')
        if additional_seconds is not None:
            self.time_dict[key] += additional_seconds
        elif seconds is not None:
            self.time_dict[key] = time.time() + seconds