<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def changeThreadTitle(self, title, thread_id=None, thread_type=ThreadType.USER):
 """ Changes title of a thread. If this is executed on a user thread, this will change the nickname of that user, effectively changing the title :param title: New group thread title :param thread_id: Group ID to change title of. See :ref:`intro_threads` :param thread_type: See :ref:`intro_threads` :type thread_type: models.ThreadType :raises: FBchatException if request failed """

        thread_id, thread_type = self._getThread(thread_id, thread_type)

        if thread_type == ThreadType.USER:
            # The thread is a user, so we change the user's nickname
            return self.changeNickname(
                title, thread_id, thread_id=thread_id, thread_type=thread_type
            )

        data = {"thread_name": title, "thread_id": thread_id}
        j = self._post(self.req_url.THREAD_NAME, data, fix_request=True, as_json=True)