code: def det_cmd_expect_error(cmd: List[str], expected: str) -> None:
      res = det_cmd(cmd)
      assert res.returncode != 0
      assert expected.lower() in res.stderr.decode().lower()
  
file_path: determined/e2e_tests/tests/cluster/test_groups.py
imports: import json
  import subprocess
  from typing import Any, List
  import pytest
  from tests import config
  from .test_users import get_random_string, logged_in_user
label_desc: Use image node_id 3 for calling a global function with example usage: det_cmd_expect_error(cmd, expected) without return types