code: def test_write_read_json_array_logical_inner_type(
      data: Any, dtype: pl.DataType
  ) -> None:
      df = pl.DataFrame({"foo": data}, schema={"foo": dtype})
      buf = io.StringIO()
      df.write_json(buf)
      buf.seek(0)
      deserialized_df = pl.read_json(buf)
      assert deserialized_df.dtypes == df.dtypes
      assert deserialized_df.to_dict(as_series=False) == df.to_dict(
          as_series=False
      )
  
imports: from __future__ import annotations
  import datetime
  import io
  import json
  from collections import OrderedDict
  from io import BytesIO
  from typing import TYPE_CHECKING, Any
  import pytest
  import polars
  from polars.testing import assert_frame_equal
label_desc: Use image node_id 22 for calling a global function with example usage: test_write_read_json_array_logical_inner_type(data, dtype) without return types