code: def test_explicit_schema_with_unexpected_behaviour(self):
      # infer by default
      rows = b'{"foo": "bar", "num": 0}\n' b'{"foo": "baz", "num": 1}\n'
      schema = pa.schema([("foo", pa.binary())])
  
      opts = ParseOptions(explicit_schema=schema)
      table = self.read_bytes(rows, parse_options=opts)
      assert table.schema == pa.schema(
          [("foo", pa.binary()), ("num", pa.int64())]
      )
      assert table.to_pydict() == {
          "foo": [b"bar", b"baz"],
          "num": [0, 1],
      }
  
      # ignore the unexpected fields
      opts = ParseOptions(
          explicit_schema=schema, unexpected_field_behavior="ignore"
      )
      table = self.read_bytes(rows, parse_options=opts)
      assert table.schema == pa.schema(
          [
              ("foo", pa.binary()),
          ]
      )
      assert table.to_pydict() == {
          "foo": [b"bar", b"baz"],
      }
  
      # raise error
      opts = ParseOptions(
          explicit_schema=schema, unexpected_field_behavior="error"
      )
      with pytest.raises(
          pa.ArrowInvalid, match="JSON parse error: unexpected field"
      ):
          self.read_bytes(rows, parse_options=opts)
  
imports: from collections import OrderedDict
  from decimal import Decimal
  import io
  import itertools
  import json
  import string
  import unittest
  import numpy
  import pytest
  import pyarrow
  from pyarrow.json import read_json, ReadOptions, ParseOptions
label_desc: Use image node_id 13 for calling the BaseTestJSONRead obj's underlying member method code with example usage: obj.test_explicit_schema_with_unexpected_behaviour() without return types