code: def test_check_shape(
      target: tuple[int | None, ...],
      shape_repr: str,
      test_shape: tuple[int, ...],
  ) -> None:
      error_pattern = "^" + re.escape(
          f"'aardvark' must be {len(target)}D with shape {shape_repr}, but your input "
          f"has shape {test_shape}"
      )
      data = np.zeros(test_shape)
      with pytest.raises(ValueError, match=error_pattern):
          _api.check_shape(target, aardvark=data)
  
file_path: matplotlib/lib/matplotlib/tests/test_api.py
imports: from __future__ import annotations
  import re
  import typing
  from typing import Any, Callable, TypeVar
  import numpy
  import pytest
  import matplotlib
  from matplotlib import _api
label_desc: Use image node_id 1 for calling a global function with example usage: test_check_shape(target, shape_repr, test_shape) without return types