old_contents: import pytest
  
  
  @pytest.fixture
  def in_tmpdir(tmpdir):
      """Change to pytest-provided temporary directory"""
      tmpdir.chdir()
  
new_contents: import pytest
  
  
  @pytest.yield_fixture
  def in_tmpdir(tmpdir):
      """Change to pytest-provided temporary directory"""
      with tmpdir.as_cwd():
          yield tmpdir
  
subject: make in_tmpdir a yield fixture, return to orig dir