code: def to_array(self):
          
          array = super(MediaGroupMessage, self).to_array()
          if isinstance(self.media, InputMediaPhoto):
              array['media'] = self._as_array(self.media)  # type list of InputMediaPhoto | list of InputMediaVideo
          elif isinstance(self.media, InputMediaVideo):
              array['media'] = self._as_array(self.media)  # type list of InputMediaPhoto | list of InputMediaVideo
          else:
              raise TypeError('Unknown type, must be one of InputMediaPhoto, InputMediaVideo.')
          # end if
  
          if self.receiver is not None:
              if isinstance(self.receiver, None):
                  array['chat_id'] = None(self.receiver)  # type Noneelif isinstance(self.receiver, str):
                  array['chat_id'] = u(self.receiver)  # py2: type unicode, py3: type str
              elif isinstance(self.receiver, int):
                  array['chat_id'] = int(self.receiver)  # type intelse:
                  raise TypeError('Unknown type, must be one of None, str, int.')
              # end if
  
          if self.reply_id is not None:
              if isinstance(self.reply_id, DEFAULT_MESSAGE_ID):
                  array['reply_to_message_id'] = DEFAULT_MESSAGE_ID(self.reply_id)  # type DEFAULT_MESSAGE_IDelif isinstance(self.reply_id, int):
                  array['reply_to_message_id'] = int(self.reply_id)  # type intelse:
                  raise TypeError('Unknown type, must be one of DEFAULT_MESSAGE_ID, int.')
              # end if
  
          if self.disable_notification is not None:
              array['disable_notification'] = bool(self.disable_notification)  # type bool
          return array
docs: Serializes this MediaGroupMessage to a dictionary.
  
          :return: dictionary representation of this object.
          :rtype: dict