<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def send(self, message, thread_id=None, thread_type=ThreadType.USER):
 """ Sends a message to a thread :param message: Message to send :param thread_id: User/Group ID to send to. See :ref:`intro_threads` :param thread_type: See :ref:`intro_threads` :type message: models.Message :type thread_type: models.ThreadType :return: :ref:`Message ID <intro_message_ids>` of the sent message :raises: FBchatException if request failed """

        thread_id, thread_type = self._getThread(thread_id, thread_type)
        data = self._getSendData(
            message=message, thread_id=thread_id, thread_type=thread_type
        )
        return self._doSendRequest(data)