code: def test_jupytext_gives_a_meaningful_error_when_writing_nbformat_3(
      sample_notebook_v3, fmt
  ):
      with pytest.raises(
          NotSupportedNBFormatVersion,
          match="Notebooks in nbformat version 3.0 are not supported by Jupytext",
      ):
          writes(sample_notebook_v3, fmt=fmt)
  
      writes(sample_notebook_v3, version=4, fmt=fmt)
  
file_path: jupytext/tests/functional/others/test_nbformat_version.py
imports: import pytest
  from nbformat import writes
  from nbformat.v3.nbbase import new_code_cell, new_notebook, new_text_cell, new_worksheet
  from nbformat.v4.nbbase import new_markdown_cell
  from nbformat.v4.nbbase import new_notebook
  from jupytext import reads, writes
  from jupytext.jupytext import NotSupportedNBFormatVersion
label_desc: Use image node_id 5 for calling a global function with example usage: test_jupytext_gives_a_meaningful_error_when_writing_nbformat_3(sample_notebook_v3, fmt) without return types