code: def test_global_config_file(tmpdir):
      cm_dir = tmpdir.join("cm_dir").mkdir()
      cm = jupytext.TextFileContentsManager()
      cm.root_dir = str(cm_dir)
  
      tmpdir.join("jupytext.toml").write('formats = "ipynb,Rmd"')
  
      def fake_global_config_directory():
          return [str(tmpdir)]
  
      with mock.patch(
          "jupytext.config.global_jupytext_configuration_directories",
          fake_global_config_directory,
      ):
          nb = new_notebook(cells=[new_code_cell("1+1")])
          model = notebook_model(nb)
          cm.save(model, "notebook.ipynb")
          assert {
              model["path"]
              for model in cm.get("/", content=True)["content"]
          } == {
              "notebook.ipynb",
              "notebook.Rmd",
          }
  
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 5 for calling a global function with example usage: test_global_config_file(tmpdir) and returns: list