code: def exec_command(command, input=None, capture=False, warn_only=False):
      """Execute the desired command, and pipe the given input into it"""
      assert isinstance(command, list)
      sys.stdout.write(
          "[jupytext] Executing {}\n".format(" ".join(command))
      )
      process = subprocess.Popen(
          command,
          **(
              dict(stdout=subprocess.PIPE, stdin=subprocess.PIPE)
              if input is not None
              else {}
          ),
      )
      out, err = process.communicate(input=input)
      if out and not capture:
          sys.stdout.write(out.decode("utf-8"))
      if err:
          sys.stderr.write(err.decode("utf-8"))
  
      if process.returncode:
          msg = f"The command '{' '.join(command)}' exited with code {process.returncode}"
          hint = (
              ""
              if warn_only
              else " (use --warn-only to turn this error into a warning)"
          )
          sys.stderr.write(
              f"[jupytext] {'Warning' if warn_only else 'Error'}: {msg}{hint}\n"
          )
          if not warn_only:
              raise SystemExit(process.returncode)
  
      return out
  
imports: import argparse
  import glob
  import json
  import os
  import re
  import shlex
  import subprocess
  import sys
  import warnings
  from copy import copy
  from tempfile import NamedTemporaryFile
  from .combine import combine_inputs_with_outputs
  from .compare import NotebookDifference, compare, test_round_trip_conversion
  from .config import load_jupytext_config, notebook_formats
  from .formats import _BINARY_FORMAT_OPTIONS, _VALID_FORMAT_OPTIONS, JUPYTEXT_FORMATS, check_auto_ext, check_file_version, long_form_multiple_formats, long_form_one_format, short_form_one_format
  from .header import recursive_update
  from .jupytext import create_prefix_dir, read, reads, write, writes
  from .kernels import find_kernel_specs, get_kernel_spec, kernelspec_from_language
  from .languages import _SCRIPT_EXTENSIONS
  from .paired_paths import InconsistentPath, base_path, find_base_path_and_format, full_path, paired_paths
  from .pairs import latest_inputs_and_outputs, read_pair, write_pair
  from .version import __version__
label_desc: Use image node_id 16 for calling a global function with example usage: exec_command(command, input, capture, warn_only) and returns: out