code: def test_schema_add_remove_metadata():
      fields = [
          pa.field("foo", pa.int32()),
          pa.field("bar", pa.string()),
          pa.field("baz", pa.list_(pa.int8())),
      ]
  
      s1 = pa.schema(fields)
  
      assert s1.metadata is None
  
      metadata = {b"foo": b"bar", b"pandas": b"badger"}
  
      s2 = s1.with_metadata(metadata)
      assert s2.metadata == metadata
  
      s3 = s2.remove_metadata()
      assert s3.metadata is None
  
      # idempotent
      s4 = s3.remove_metadata()
      assert s4.metadata is None
  
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 19 for calling a global function with example usage: test_schema_add_remove_metadata() without return types