<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sign(self, signer: Signer):
 """ Sign message using signer. """

        message_data = self._data_to_sign()
        self.signature = signer.sign(data=message_data)