code: def test_arrow_schema_convertion():
      fields = [
          pa.field("string", pa.string()),
          pa.field("int8", pa.int8()),
          pa.field("int16", pa.int16()),
          pa.field("int32", pa.int32()),
          pa.field("int64", pa.int64()),
          pa.field("float", pa.float32()),
          pa.field("double", pa.float64()),
          pa.field("bool", pa.bool_(), False),
          pa.field("fixed_size_binary", pa.binary(10)),
          pa.field("variable_size_binary", pa.binary()),
          pa.field("decimal", pa.decimal128(3, 4)),
          pa.field("timestamp_s", pa.timestamp("s")),
          pa.field("timestamp_ns", pa.timestamp("ns")),
          pa.field("date_32", pa.date32()),
          pa.field("date_64", pa.date64()),
      ]
      arrow_schema = pa.schema(fields)
  
      mock_dataset = _mock_parquet_dataset([], arrow_schema)
  
      unischema = Unischema.from_arrow_schema(mock_dataset)
      for name in arrow_schema.names:
          assert getattr(unischema, name).name == name
          assert getattr(unischema, name).codec is None
  
          if name == "bool":
              assert not getattr(unischema, name).nullable
          else:
              assert getattr(unischema, name).nullable
  
      # Test schema preserve fields order
      field_name_list = [f.name for f in fields]
      assert list(unischema.fields.keys()) == field_name_list
  
imports: from __future__ import division
  from decimal import Decimal
  import numpy
  import pyarrow
  import pyarrow.parquet
  import pytest
  from pyspark import Row
  from pyspark.sql.types import StringType, IntegerType, DecimalType, ShortType, LongType
  from petastorm.codecs import ScalarCodec, NdarrayCodec
  from petastorm.unischema import Unischema, UnischemaField, dict_to_spark_row, insert_explicit_nulls, match_unischema_fields, _new_gt_255_compatible_namedtuple, _fullmatch
  from unittest import mock
label_desc: Use image node_id 23 for calling a global function with example usage: test_arrow_schema_convertion() without return types