code: def get_logical_type(arrow_type):
      logical_type_map = get_logical_type_map()
  
      try:
          return logical_type_map[arrow_type.id]
      except KeyError:
          if isinstance(arrow_type, pa.lib.DictionaryType):
              return "categorical"
          elif isinstance(arrow_type, pa.lib.ListType):
              return "list[{}]".format(
                  get_logical_type(arrow_type.value_type)
              )
          elif isinstance(arrow_type, pa.lib.TimestampType):
              return (
                  "datetimetz"
                  if arrow_type.tz is not None
                  else "datetime"
              )
          elif isinstance(arrow_type, pa.lib.Decimal128Type):
              return "decimal"
          return "object"
  
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 2 for calling a global function with example usage: get_logical_type(arrow_type) and returns: logical_type_map, str, str, str, unknown, str