code: def send_media_group(chat_id, media,
                       reply_to_message_id=None, disable_notification=False,
                       **kwargs):
      
  
      files = []
      if len(media) < 2 or len(media) > 10:
          raise ValueError('media must contain between 2 and 10 InputMedia items')
  
      for i, entry in media:
          if isinstance(entry.media, InputFile):
              files.append(entry.media)  # Queue for multipart/form-data POSTING
              media[i].media = "attach://{}".format(entry[1][0])  # Replace with file name and add to attachments
  
      # required args
      params = dict(
          chat_id=chat_id,
          media=json.dumps(media)
      )
  
      # optional args
      params.update(
          _clean_params(
              reply_to_message_id=reply_to_message_id,
              disable_notification=disable_notification,
          )
      )
  
      return TelegramBotRPCRequest('sendMediaGroup', params=params, files=files, on_result=lambda result: [Message.from_result(message) for message in result], **kwargs)
docs: Use this method to send a group of photos or videos as an album. On success, an array of the sent Messages is returned.
  
      :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
      :param media: A list of InputMedia objects to be sent, must include 2–10 items
      :param reply_to_message_id: If the message is a reply, ID of the original message
      :param disable_notification: Sends the messages silently. Users will receive a notification with no sound.
      :param kwargs: Args that get passed down to :class:`TelegramBotRPCRequest`
  
      :type chat_id: int or str
      :type media: `list` of :class:`InputMedia`
      :type reply_to_message_id: int
  
      :returns: On success, an array of the sent Messages is returned.
      :rtype: TelegramBotRPCRequest