<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def generate_psk(self, identity):
 """ Generates the PRE_SHARED_KEY from the gateway. Returns a Command. """

        def process_result(result):
            return result[ATTR_PSK]

        return Command('post', [ROOT_GATEWAY, ATTR_AUTH], {
            ATTR_IDENTITY: identity
        }, process_result=process_result)