code: def test_execute(tmpdir, caplog, capsys):
      tmp_ipynb = str(tmpdir.join("notebook.ipynb"))
      tmp_py = str(tmpdir.join("notebook.py"))
  
      with open(tmp_py, "w") as fp:
          fp.write(
              """1 + 2
  """
          )
  
      jupytext(args=[tmp_py, "--to", "ipynb", "--execute"])
  
      nb = read(tmp_ipynb)
      assert len(nb.cells) == 1
      assert nb.cells[0].outputs[0]["data"] == {"text/plain": "3"}
  
file_path: jupytext/tests/integration/cli/test_execute.py
imports: import shutil
  from io import StringIO
  from unittest import mock
  import pytest
  from jupytext import read, reads
  from jupytext.cli import jupytext
  from jupytext.version import __version__
label_desc: Use image node_id 3 for calling a global function with example usage: test_execute(tmpdir, caplog, capsys) without return types