code: def registered_extension_type(ext_type):
      pa.register_extension_type(ext_type)
      try:
          yield
      finally:
          pa.unregister_extension_type(ext_type.extension_name)
  
imports: import contextlib
  import ctypes
  import gc
  import pyarrow
  import pytest
label_desc: Use image node_id 2 for calling a global function with example usage: registered_extension_type(ext_type) without return types