code: def test_validator(line: str, error: str) -> None:
      ast = parse(
          f"""
  import argparse
  parser = argparse.ArgumentParser()
  group = parser.add_argument_group()
  opts = parser.parse_args([])
  {line}
  """
      )
      validator = CheckConventionsVisitor(filename="dummy-file")
  
      if error is None:
          validator.visit(ast)
          return
  
      with pytest.raises(CodeConventionError) as excinfo:
          validator.visit(ast)
  
      assert error in str(
          excinfo.value
      ), f"Expected {line} to raise CodeConventionError({error}) but it didn't."
  
imports: import dataclasses
  import re
  import subprocess
  from ast import Attribute, Call, Constant, Name, NodeVisitor, parse
  from pathlib import Path
  from typing import Any, Callable, Dict, List
  import pytest
label_desc: Use image node_id 1 for calling a global function with example usage: test_validator(line, error) without return types