code: def test_extension_type_constructor_errors(klass):
      # ARROW-2638: prevent calling extension class constructors directly
      msg = "Do not call {cls}'s constructor directly, use .* instead."
      with pytest.raises(
          TypeError, match=msg.format(cls=klass.__name__)
      ):
          klass()
  
file_path: arrow/python/pyarrow/tests/test_misc.py
imports: import os
  import subprocess
  import sys
  import pytest
  import pyarrow
  from pyarrow.lib import ArrowInvalid
label_desc: Use image node_id 10 for calling a global function with example usage: test_extension_type_constructor_errors(klass) without return types