code: def test_find_jupytext_configuration_file(tmpdir):
      nested = tmpdir.mkdir("nested")
  
      # Start with no configuration
      assert find_jupytext_configuration_file(str(nested)) is None
  
      # Configuration file in the parent directory
      root_config = tmpdir.join("jupytext.yml")
      root_config.write("\n")
      assert os.path.samefile(
          find_jupytext_configuration_file(str(tmpdir)),
          str(root_config),
      )
      assert os.path.samefile(
          find_jupytext_configuration_file(str(nested)),
          str(root_config),
      )
  
      # Local pyproject file
      pyproject_config = nested.join("pyproject.toml")
      pyproject_config.write("[tool.jupytext]\n")
      assert os.path.samefile(
          find_jupytext_configuration_file(str(tmpdir)),
          str(root_config),
      )
      assert os.path.samefile(
          find_jupytext_configuration_file(str(nested)),
          str(pyproject_config),
      )
  
      # Local configuration file
      local_config = nested.join(".jupytext")
      local_config.write("\n")
      assert os.path.samefile(
          find_jupytext_configuration_file(str(tmpdir)),
          str(root_config),
      )
      assert os.path.samefile(
          find_jupytext_configuration_file(str(nested)),
          str(local_config),
      )
  
file_path: jupytext/tests/functional/config/test_config.py
imports: import os
  import pytest
  from jupytext.config import find_jupytext_configuration_file, load_jupytext_configuration_file
label_desc: Use image node_id 1 for calling a global function with example usage: test_find_jupytext_configuration_file(tmpdir) without return types