code: def make_dvc_venv(tmp_path_factory):
      def _make_dvc_venv(name):
          name = _sanitize_venv_name(name)
          venv_dir = tmp_path_factory.mktemp(f"dvc-venv-{name}")
          venv = VirtualEnv(venv_dir)
          venv.create()
          return venv
  
      return _make_dvc_venv
  
imports: import os
  import shutil
  from pathlib import Path
  from subprocess import check_output
  from typing import Dict, Optional
  import pytest
  from dulwich.porcelain import clone
  from funcy import first
  from packaging import version
  from dvc.types import StrPath
label_desc: Use image node_id 2 for calling a global function with example usage: make_dvc_venv(tmp_path_factory) and returns: _make_dvc_venv, venv