<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_message(bot, message):
 """ Create a ``Chat`` object from a message. :param Bot bot: ``Bot`` object the message and chat belong to :param dict message: Message to base the object on :return: A chat object based on the message """

        chat = message["chat"]
        return Chat(bot, chat["id"], chat["type"], message)