code: def test_validate_basetemp_fails(tmp_path, basetemp, monkeypatch):
      monkeypatch.chdir(str(tmp_path))
      msg = "basetemp must not be empty, the current working directory or any parent directory of it"
      with pytest.raises(argparse.ArgumentTypeError, match=msg):
          if basetemp:
              basetemp = tmp_path / basetemp
          validate_basetemp(basetemp)
  
imports: import argparse
  import os
  import re
  import sys
  from pathlib import Path
  from typing import Optional
  import pytest
  from _pytest.config import ExitCode
  from _pytest.config import UsageError
  from _pytest.main import resolve_collection_argument
  from _pytest.main import validate_basetemp
  from _pytest.pytester import Pytester
label_desc: Use image node_id 4 for calling a global function with example usage: test_validate_basetemp_fails(tmp_path, basetemp, monkeypatch) without return types