def METHOD_NAME(self, overwrite=False):
    """Submit batch job to Flux with flux batch.
    The script file is written before being submitted.
    Args:
        overwrite (bool): Whether to overwrite script file if it
            already exists (default: false).
    Returns:
        int: Exit status from sbatch.
    """
    # Construct script file
    self.write(overwrite=overwrite)
    # Submit batch script and pipe output to log files
    run_proc = subprocess.Popen(['flux batch', self.script_file],
                                stdout=subprocess.PIPE,
                                stderr=subprocess.PIPE,
                                cwd=self.work_dir)
    out_proc = subprocess.Popen(['tee', self.out_log_file],
                                stdin=run_proc.stdout,
                                cwd=self.work_dir)
    err_proc = subprocess.Popen(['tee', self.err_log_file],
                                stdin=run_proc.stderr,
                                cwd=self.work_dir)
    run_proc.stdout.close()
    run_proc.stderr.close()
    run_proc.wait()
    out_proc.wait()
    err_proc.wait()
    return run_proc.returncode