code: def test_cm_config_log_only_if_changed(
      cwd_tmp_path, tmp_path, caplog
  ):
      cm = jupytext.TextFileContentsManager()
      cm.root_dir = str(tmp_path)
  
      config = ""
      (tmp_path / "jupytext.toml").write_text(config)
      (tmp_path / "nb1.py").write_text("# %%")
      (tmp_path / "subfolder").mkdir()
      (tmp_path / "subfolder" / "jupytext.toml").write_text(config)
      (tmp_path / "subfolder" / "nb2.py").write_text("# %%")
  
      caplog.set_level(logging.INFO)
  
      cm.get("nb1.py", type="notebook", content=False)
      assert "Jupytext configuration file" in caplog.text
      caplog.clear()
  
      # Same notebook, same config => no log
      cm.get("nb1.py", type="notebook", content=True)
      assert "Jupytext configuration file" not in caplog.text
  
      # Same notebook, config changed => log
      (tmp_path / "jupytext.toml").write_text(
          'formats="ipynb,py:percent"'
      )
      cm.get("nb1.py", type="notebook", content=True)
      assert "Jupytext configuration file" in caplog.text
      caplog.clear()
  
      # Different folder, different config
      cm.get("subfolder/nb2.py", type="notebook", content=False)
      assert "Jupytext configuration file" in caplog.text
      caplog.clear()
  
      # Same config as previously => no log
      cm.get("subfolder/nb2.py", type="notebook", content=False)
      assert "Jupytext configuration file" not in caplog.text
  
imports: import logging
  import os
  import sys
  import unittest.mock
  import pytest
  from nbformat import read
  from nbformat.v4.nbbase import new_code_cell, new_markdown_cell, new_notebook
  from tornado.web import HTTPError
  import jupytext
  from jupytext import TextFileContentsManager
  from jupytext.compare import compare_cells, notebook_model
label_desc: Use image node_id 10 for calling a global function with example usage: test_cm_config_log_only_if_changed(cwd_tmp_path, tmp_path, caplog) without return types