code: def convert_group(cwd, infiles, out_prefix, threshold):
      args = [
          "jbig2",
          "-b",
          out_prefix,
          "--symbol-mode",  # symbol mode (lossy)
          "-t",
          str(threshold),  # threshold
          # '-r', # refinement mode (lossless symbol mode, currently disabled in
          # jbig2)
          "--pdf",
      ]
      args.extend(infiles)
      proc = run(args, cwd=cwd, stdout=PIPE, stderr=PIPE)
      proc.check_returncode()
      return proc
  
file_path: OCRmyPDF/src/ocrmypdf/_exec/jbig2enc.py
imports: from __future__ import annotations
  from subprocess import PIPE
  from packaging.version import Version
  from ocrmypdf.exceptions import MissingDependencyError
  from ocrmypdf.subprocess import get_version, run
label_desc: Use image node_id 3 for calling a global function with example usage: convert_group(cwd, infiles, out_prefix, threshold) and returns: proc