code: def test_schema_merge():
      a = pa.schema(
          [
              pa.field("foo", pa.int32()),
              pa.field("bar", pa.string()),
              pa.field("baz", pa.list_(pa.int8())),
          ]
      )
      b = pa.schema(
          [pa.field("foo", pa.int32()), pa.field("qux", pa.bool_())]
      )
      c = pa.schema(
          [pa.field("quux", pa.dictionary(pa.int32(), pa.string()))]
      )
      d = pa.schema(
          [pa.field("foo", pa.int64()), pa.field("qux", pa.bool_())]
      )
  
      result = pa.unify_schemas([a, b, c])
      expected = pa.schema(
          [
              pa.field("foo", pa.int32()),
              pa.field("bar", pa.string()),
              pa.field("baz", pa.list_(pa.int8())),
              pa.field("qux", pa.bool_()),
              pa.field("quux", pa.dictionary(pa.int32(), pa.string())),
          ]
      )
      assert result.equals(expected)
  
      with pytest.raises(pa.ArrowTypeError):
          pa.unify_schemas([b, d])
  
      # ARROW-14002: Try with tuple instead of list
      result = pa.unify_schemas((a, b, c))
      assert result.equals(expected)
  
      result = pa.unify_schemas([b, d], promote_options="permissive")
      assert result.equals(d)
  
      # raise proper error when passing a non-Schema value
      with pytest.raises(TypeError):
          pa.unify_schemas([a, 1])
  
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 31 for calling a global function with example usage: test_schema_merge() without return types