<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, msg):
 """sign a message"""

        signature = SHA256.new()
        signature.update(self._mackey1)
        signature.update(msg)
        signature.update(self._mackey2)
        return signature.digest()