<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 async def sign(self, message: bytes) -> bytes: """ Sign message; return signature. Raise WalletState if wallet is closed. :param message: Content to sign, as bytes :return: signature, as bytes """


        LOGGER.debug('BaseAnchor.sign >>> message: %s', message)

        if not self.wallet.handle:
            LOGGER.debug('BaseAnchor.sign <!< Wallet %s is closed', self.name)
            raise WalletState('Wallet {} is closed'.format(self.name))

        rv = await self.wallet.sign(message)

        LOGGER.debug('BaseAnchor.sign <<< %s', rv)
        return rv