<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def secret_from_transfer_task( transfer_task: Optional[TransferTask], secrethash: SecretHash, ) -> Optional[Secret]: """Return the secret for the transfer, None on EMPTY_SECRET."""

    assert isinstance(transfer_task, InitiatorTask)

    transfer_state = transfer_task.manager_state.initiator_transfers[secrethash]

    if transfer_state is None:
        return None

    return transfer_state.transfer_description.secret