<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _sendFiles( self, files, message=None, thread_id=None, thread_type=ThreadType.USER ):
 """ Sends files from file IDs to a thread `files` should be a list of tuples, with a file's ID and mimetype """

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

        data["action_type"] = "ma-type:user-generated-message"
        data["has_attachment"] = True

        for i, (file_id, mimetype) in enumerate(files):
            data["{}s[{}]".format(mimetype_to_key(mimetype), i)] = file_id

        return self._doSendRequest(data)