<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def reset_new_request(self):
 """Remove the non-sense args from the self.ignore, return self.new_request"""

        raw_url = self.new_request['url']
        parsed_url = urlparse(raw_url)
        qsl = parse_qsl(parsed_url.query)
        new_url = self._join_url(
            parsed_url, [i for i in qsl if i not in self.ignore['qsl']])
        self.new_request['url'] = new_url
        self.logger_function('ignore: %s' % self.ignore)
        for key in self.ignore['headers']:
            self.new_request['headers'].pop(key)

        if not self.new_request.get('headers'):
            self.new_request.pop('headers', None)
        if self.ignore['Cookie'] and 'Cookie' not in self.ignore['headers']:
            headers = self.new_request['headers']
            headers = {key.title(): headers[key] for key in headers}
            if 'Cookie' in headers:
                cookies = SimpleCookie(headers['Cookie'])
                new_cookie = '; '.join([
                    i[1].OutputString()
                    for i in cookies.items()
                    if i[0] not in self.ignore['Cookie']
                ])
                self.new_request['headers']['Cookie'] = new_cookie

        if self.new_request['method'] == 'post':
            data = self.new_request.get('data')
            if data:
                if isinstance(data, dict):
                    for key in self.ignore['form_data']:
                        data.pop(key)
                if (not data) or self.ignore['total_data']:
                    # not need data any more
                    self.new_request.pop('data', None)
                if self.has_json_data and 'data' in self.new_request:
                    json_data = json.loads(data.decode(self.encoding))
                    for key in self.ignore['json_data']:
                        json_data.pop(key)
                    self.new_request['data'] = json.dumps(json_data).encode(
                        self.encoding)
        return self.new_request