<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(self, key, val, bucket):
 """ Set a cached item by key WARN: Regardless if the item is already in the cache, it will be udpated with the new value. """


        if bucket not in self._cache:
            self._cache[bucket] = {}

        self._cache[bucket][key] = val