<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def consume_message(self, header, message):
 """Consume a message"""

        logmessage = {
            "time": (time.time() % 1000) * 1000,
            "header": "",
            "message": message,
        }
        if header:
            logmessage["header"] = (
                json.dumps(header, indent=2) + "\n" + "----------------" + "\n"
            )
        if isinstance(message, dict):
            logmessage["message"] = (
                json.dumps(message, indent=2) + "\n" + "----------------" + "\n"
            )

        print("=== Consume ====\n{header}{message}".format(**logmessage))
        self.log.info("Received message @{time}".format(**logmessage))
        self.log.debug(
            "Received message @{time}\n{header}{message}".format(**logmessage)
        )
        time.sleep(0.1)