<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def changeGroupApprovalMode(self, require_admin_approval, thread_id=None):
 """ Changes group's approval mode :param require_admin_approval: True or False :param thread_id: Group ID to remove people from. See :ref:`intro_threads` :raises: FBchatException if request failed """

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

        data = {"set_mode": int(require_admin_approval), "thread_fbid": thread_id}
        j = self._post(self.req_url.APPROVAL_MODE, data, fix_request=True, as_json=True)