code: def chdir_tmpdir(request, tmp_path):
      if request.node.__class__.__name__ == "DoctestItem":
          with _chdir(tmp_path):
              yield
      else:
          yield
  
label_desc: Use image node_id 1 for calling a global function with example usage: chdir_tmpdir(request, tmp_path) without return types