code: def test_private_is_deprecated() -> None:
      class PrivateInit:
          def __init__(
              self, foo: int, *, _ispytest: bool = False
          ) -> None:
              deprecated.check_ispytest(_ispytest)
  
      with pytest.warns(
          pytest.PytestDeprecationWarning,
          match="private pytest class or function",
      ):
          PrivateInit(10)
  
      # Doesn't warn.
      PrivateInit(10, _ispytest=True)
  
file_path: pytest/testing/deprecated_test.py
imports: import pytest
  from _pytest import deprecated
  from _pytest.pytester import Pytester
  from pytest import PytestDeprecationWarning
label_desc: Use image node_id 5 for calling a global function with example usage: test_private_is_deprecated() without return types