code: def test_schema_from_mapping():
      fields = OrderedDict(
          [
              ("foo", pa.int32()),
              ("bar", pa.string()),
              ("baz", pa.list_(pa.int8())),
          ]
      )
      sch = pa.schema(fields)
      assert sch.names == ["foo", "bar", "baz"]
      assert sch.types == [pa.int32(), pa.string(), pa.list_(pa.int8())]
      assert len(sch) == 3
      assert (
          repr(sch)
          == """\
  foo: int32
  bar: string
  baz: list<item: int8>
    child 0, item: int8"""
      )
  
      fields = OrderedDict([("foo", None)])
      with pytest.raises(TypeError):
          pa.schema(fields)
  
imports: from collections import OrderedDict
  import sys
  import weakref
  import pytest
  import numpy
  import pyarrow
  import pyarrow.tests.util
  from pyarrow.vendored.version import Version
label_desc: Use image node_id 16 for calling a global function with example usage: test_schema_from_mapping() without return types