code: def test_array_brackets(method: str) -> None:
      if method == "class":
          serialise = Querystring(array_format="brackets").stringify
      else:
          serialise = partial(stringify, array_format="brackets")
  
      assert (
          unquote(serialise({"in": ["foo", "bar"]}))
          == "in[]=foo&in[]=bar"
      )
      assert (
          unquote(serialise({"a": {"b": [True, False]}}))
          == "a[b][]=true&a[b][]=false"
      )
      assert (
          unquote(serialise({"a": {"b": [True, False, None, True]}}))
          == "a[b][]=true&a[b][]=false&a[b][]=true"
      )
  
file_path: openai-python/tests/test_qs.py
imports: from typing import Any, cast
  from functools import partial
  from urllib.parse import unquote
  import pytest
  from openai._qs import Querystring, stringify
label_desc: Use image node_id 7 for calling a global function with example usage: test_array_brackets(method) without return types