code: def get_extension_dtype_info(column):
      dtype = column.dtype
      if str(dtype) == "category":
          cats = getattr(column, "cat", column)
          assert cats is not None
          metadata = {
              "num_categories": len(cats.categories),
              "ordered": cats.ordered,
          }
          physical_dtype = str(cats.codes.dtype)
      elif hasattr(dtype, "tz"):
          metadata = {"timezone": pa.lib.tzinfo_to_string(dtype.tz)}
          physical_dtype = "datetime64[ns]"
      else:
          metadata = None
          physical_dtype = str(dtype)
      return physical_dtype, metadata
  
imports: import ast
  from collections.abc import Sequence
  from concurrent import futures
  import concurrent.futures.thread
  from copy import deepcopy
  from itertools import zip_longest
  import json
  import operator
  import re
  import warnings
  import numpy
  import pyarrow
  from pyarrow.lib import _pandas_api, frombytes
label_desc: Use image node_id 4 for calling a global function with example usage: get_extension_dtype_info(column) and returns: physical_dtype,  metadata