docs: def from_array(array):
          """
          Deserialize a new Message from a given dictionary.
  
          :return: new Message instance.
          :rtype: Message
          """
          if array is None or not array:
              return None
          # end if
          assert_type_or_raise(array, dict, parameter_name="array")
  
          from ..receivable.peer import User, Chat
          from ..receivable.media import Animation, Audio, Contact, Document, Game, Location, MessageEntity, PhotoSize
          from ..receivable.media import Sticker, Venue, Video, VideoNote, Voice
          from ..receivable.payments import Invoice, SuccessfulPayment
          from ..receivable.passport import PassportData
  
          data = {}
          data['message_id'] = int(array.get('message_id'))
          data['date'] = int(array.get('date'))
          data['chat'] = Chat.from_array(array.get('chat'))
          data['from_peer'] = User.from_array(array.get('from')) if array.get('from') is not None else None
          data['forward_from'] = User.from_array(array.get('forward_from')) if array.get('forward_from') is not None else None
          data['forward_from_chat'] = Chat.from_array(array.get('forward_from_chat')) if array.get('forward_from_chat') is not None else None
          data['forward_from_message_id'] = int(array.get('forward_from_message_id')) if array.get('forward_from_message_id') is not None else None
          data['forward_signature'] = u(array.get('forward_signature')) if array.get('forward_signature') is not None else None
          data['forward_date'] = int(array.get('forward_date')) if array.get('forward_date') is not None else None
          data['reply_to_message'] = Message.from_array(array.get('reply_to_message')) if array.get('reply_to_message') is not None else None
          data['edit_date'] = int(array.get('edit_date')) if array.get('edit_date') is not None else None
          data['media_group_id'] = u(array.get('media_group_id')) if array.get('media_group_id') is not None else None
          data['author_signature'] = u(array.get('author_signature')) if array.get('author_signature') is not None else None
          data['text'] = u(array.get('text')) if array.get('text') is not None else None
          data['entities'] = MessageEntity.from_array_list(array.get('entities'), list_level=1) if array.get('entities') is not None else None
          data['caption_entities'] = MessageEntity.from_array_list(array.get('caption_entities'), list_level=1) if array.get('caption_entities') is not None else None
          data['audio'] = Audio.from_array(array.get('audio')) if array.get('audio') is not None else None
          data['document'] = Document.from_array(array.get('document')) if array.get('document') is not None else None
          data['animation'] = Animation.from_array(array.get('animation')) if array.get('animation') is not None else None
          data['game'] = Game.from_array(array.get('game')) if array.get('game') is not None else None
          data['photo'] = PhotoSize.from_array_list(array.get('photo'), list_level=1) if array.get('photo') is not None else None
          data['sticker'] = Sticker.from_array(array.get('sticker')) if array.get('sticker') is not None else None
          data['video'] = Video.from_array(array.get('video')) if array.get('video') is not None else None
          data['voice'] = Voice.from_array(array.get('voice')) if array.get('voice') is not None else None
          data['video_note'] = VideoNote.from_array(array.get('video_note')) if array.get('video_note') is not None else None
          data['caption'] = u(array.get('caption')) if array.get('caption') is not None else None
          data['contact'] = Contact.from_array(array.get('contact')) if array.get('contact') is not None else None
          data['location'] = Location.from_array(array.get('location')) if array.get('location') is not None else None
          data['venue'] = Venue.from_array(array.get('venue')) if array.get('venue') is not None else None
          data['new_chat_members'] = User.from_array_list(array.get('new_chat_members'), list_level=1) if array.get('new_chat_members') is not None else None
          data['left_chat_member'] = User.from_array(array.get('left_chat_member')) if array.get('left_chat_member') is not None else None
          data['new_chat_title'] = u(array.get('new_chat_title')) if array.get('new_chat_title') is not None else None
          data['new_chat_photo'] = PhotoSize.from_array_list(array.get('new_chat_photo'), list_level=1) if array.get('new_chat_photo') is not None else None
          data['delete_chat_photo'] = bool(array.get('delete_chat_photo')) if array.get('delete_chat_photo') is not None else None
          data['group_chat_created'] = bool(array.get('group_chat_created')) if array.get('group_chat_created') is not None else None
          data['supergroup_chat_created'] = bool(array.get('supergroup_chat_created')) if array.get('supergroup_chat_created') is not None else None
          data['channel_chat_created'] = bool(array.get('channel_chat_created')) if array.get('channel_chat_created') is not None else None
          data['migrate_to_chat_id'] = int(array.get('migrate_to_chat_id')) if array.get('migrate_to_chat_id') is not None else None
          data['migrate_from_chat_id'] = int(array.get('migrate_from_chat_id')) if array.get('migrate_from_chat_id') is not None else None
          data['pinned_message'] = Message.from_array(array.get('pinned_message')) if array.get('pinned_message') is not None else None
          data['invoice'] = Invoice.from_array(array.get('invoice')) if array.get('invoice') is not None else None
          data['successful_payment'] = SuccessfulPayment.from_array(array.get('successful_payment')) if array.get('successful_payment') is not None else None
          data['connected_website'] = u(array.get('connected_website')) if array.get('connected_website') is not None else None
          data['passport_data'] = PassportData.from_array(array.get('passport_data')) if array.get('passport_data') is not None else None
          data['_raw'] = array
          return Message(**data)