code: def send_im(self, target, message, mentions=None, parse=None, update_msg_id=None, wrap_length=5000):
          
          try:
              responses = set()
              for text in wrap(string=str(message), length=wrap_length):
                  response = self.http_session.post(
                      url="{}/im/sendIM".format(self.api_base_url),
                      data={
                          "r": uuid.uuid4(),
                          "aimsid": self.token,
                          "t": target,
                          "message": text,
                          "mentions": (
                              mentions if isinstance(mentions, six.string_types) or not hasattr(mentions, "__iter__")
                              else ",".join(mentions)
                          ),
                          "parse": json.dumps([p.value for p in parse]) if parse is not None else None,
                          "updateMsgId": update_msg_id
                      },
                      timeout=self.timeout_s
                  )
  
                  try:
                      self.__sent_im_cache[response.json()["response"]["data"]["msgId"]] = text
                  except (LookupError, TypeError):
                      self.log.exception("Error while getting 'msgId'!")
  
                  responses.add(response)
              return tuple(responses)
          except ReadTimeout:
              self.log.exception("Timeout while sending request!")
docs: Send text message.
  
          :param target: Target user UIN or chat ID.
          :param message: Message text.
          :param mentions: Iterable with UINs to mention in message.
          :param parse: Iterable with several values from :class:`icq.constant.MessageParseType` specifying which message
              items should be parsed by target client (making preview, snippets, etc.). Specify empty iterable to avoid
              parsing message at target client. By default all types are included.
          :param update_msg_id: Message ID to update.
          :param wrap_length: Maximum length of symbols in one message. Text exceeding this length will be sent in several
              messages.
  
          :return: Tuple of HTTP responses.