code: def tmp_dir(tmp_path, make_tmp_dir, request, monkeypatch):
      monkeypatch.chdir(tmp_path)
      fixtures = request.fixturenames
      return make_tmp_dir(
          tmp_path, scm="scm" in fixtures, dvc="dvc" in fixtures
      )
  
imports: import os
  import pathlib
  import subprocess
  from typing import Dict, Tuple
  import pytest
  from .scripts import copy_script
label_desc: Use image node_id 2 for calling a global function with example usage: tmp_dir(tmp_path, make_tmp_dir, request, monkeypatch) and returns: make_tmp_dir