code: def test_make_keyword_only() -> None:
      @_api.make_keyword_only("3.0", "arg")
      def func(pre: Any, arg: Any, post: Any = None) -> None:
          pass
  
      func(1, arg=2)  # Check that no warning is emitted.
  
      with pytest.warns(mpl.MatplotlibDeprecationWarning):
          func(1, 2)
      with pytest.warns(mpl.MatplotlibDeprecationWarning):
          func(1, 2, 3)
  
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 5 for calling a global function with example usage: test_make_keyword_only() without return types