<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def list_hooks(self, key_name):
 """Return list of all hooks attached to key_name."""

        kf = self.dct[key_name]
        if 'hooks' not in kf:
            return []
        else:
            return kf['hooks'].iterkeys()