:param session: A logged in :class:`~okcupyd.session.Session`.
        :param thread_ids_or_threads: A list whose members are either
                                      :class:`~.MessageThread` instances
                                      or okc_ids of message threads.
        :param authcode: Authcode to use for this request. If none is provided
                         A request to the logged in user's messages page
                         will be made to retrieve one.

def delete_threads(cls, session, thread_ids_or_threads, authcode=None):
        """
        :param session: A logged in :class:`~okcupyd.session.Session`.
        :param thread_ids_or_threads: A list whose members are either
                                      :class:`~.MessageThread` instances
                                      or okc_ids of message threads.
        :param authcode: Authcode to use for this request. If none is provided
                         A request to the logged in user's messages page
                         will be made to retrieve one.
        """
        thread_ids = [thread.id if isinstance(thread, cls) else thread
                      for thread in thread_ids_or_threads]
        if not authcode:
            authcode = helpers.get_authcode(html.fromstring(
                session.okc_get('messages').content
            ))
        data = {'access_token': authcode,
                'threadids': simplejson.dumps(thread_ids)}
        return session.okc_delete('apitun/messages/threads',
                                  params=data, data=data)