<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def append(self, key, item):
 """Append item to the list at key. Creates the list at key if it doesn't exist. """

        with self._lock:
            if key in self._dict:
                self._dict[key].append(item)
            else:
                self._dict[key] = [item]