code: def test_schema_equals():
      fields = [
          pa.field("foo", pa.int32()),
          pa.field("bar", pa.string()),
          pa.field("baz", pa.list_(pa.int8())),
      ]
      metadata = {b"foo": b"bar", b"pandas": b"badger"}
  
      sch1 = pa.schema(fields)
      sch2 = pa.schema(fields)
      sch3 = pa.schema(fields, metadata=metadata)
      sch4 = pa.schema(fields, metadata=metadata)
  
      assert sch1.equals(sch2, check_metadata=True)
      assert sch3.equals(sch4, check_metadata=True)
      assert sch1.equals(sch3)
      assert not sch1.equals(sch3, check_metadata=True)
      assert not sch1.equals(sch3, check_metadata=True)
  
      del fields[-1]
      sch3 = pa.schema(fields)
      assert not sch1.equals(sch3)
  
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 20 for calling a global function with example usage: test_schema_equals() without return types