code: def _numpy_and_codec_from_arrow_type(field_type):
      from pyarrow import types
  
      if types.is_int8(field_type):
          np_type = np.int8
      elif types.is_uint8(field_type):
          np_type = np.uint8
      elif types.is_int16(field_type):
          np_type = np.int16
      elif types.is_int32(field_type):
          np_type = np.int32
      elif types.is_int64(field_type):
          np_type = np.int64
      elif types.is_string(field_type):
          np_type = np.unicode_
      elif types.is_boolean(field_type):
          np_type = np.bool_
      elif types.is_float32(field_type):
          np_type = np.float32
      elif types.is_float64(field_type):
          np_type = np.float64
      elif types.is_decimal(field_type):
          np_type = Decimal
      elif types.is_binary(field_type):
          np_type = np.string_
      elif types.is_fixed_size_binary(field_type):
          np_type = np.string_
      elif types.is_date(field_type):
          np_type = np.datetime64
      elif types.is_timestamp(field_type):
          np_type = np.datetime64
      elif types.is_list(field_type):
          np_type = _numpy_and_codec_from_arrow_type(
              field_type.value_type
          )
      else:
          raise ValueError(
              "Cannot auto-create unischema due to unsupported column type {}".format(
                  field_type
              )
          )
      return np_type
  
imports: import copy
  import re
  import sys
  import warnings
  from collections import namedtuple, OrderedDict
  from decimal import Decimal
  from typing import Dict, Any, Tuple, Optional, NamedTuple
  import numpy
  import pyarrow
  import six
  from pyarrow.lib import ListType
  from pyarrow.lib import StructType
  from six import string_types
label_desc: Use image node_id 9 for calling a global function with example usage: _numpy_and_codec_from_arrow_type(field_type) and returns: np_type