<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _run_query(self, path, query, query_args, drop_no=True):
 """Runs `query` and outputs results to a file at `path`. If `path` exists, the query is not run. :param path: path to output results to :type path: `str` :param query: query to run :type query: `method` :param query_args: arguments to supply to the query :type query_args: `list` :param drop_no: whether to drop results from the No corpus :type drop_no: `bool` """

        if os.path.exists(path):
            return
        output_results = io.StringIO(newline='')
        query(*query_args, output_fh=output_results)
        with open(path, mode='w', encoding='utf-8', newline='') as fh:
            if drop_no:
                self._drop_no_label_results(output_results, fh)
            else:
                fh.write(output_results.getvalue())