code: def test_config_load_save(tmp_path: Path) -> None:
      for file in (
          None,
          tmp_path / "polars.config",
          str(tmp_path / "polars.config"),
      ):
          # set some config options...
          pl.Config.set_tbl_cols(12)
          pl.Config.set_verbose(True)
          pl.Config.set_fmt_float("full")
          pl.Config.set_float_precision(6)
          pl.Config.set_thousands_separator(",")
          assert os.environ.get("POLARS_VERBOSE") == "1"
  
          if file is None:
              cfg = pl.Config.save()
              assert isinstance(cfg, str)
          else:
              assert pl.Config.save_to_file(file) is None
  
          assert "POLARS_VERBOSE" in pl.Config.state(if_set=True)
  
          # ...modify the same options...
          pl.Config.set_tbl_cols(10)
          pl.Config.set_verbose(False)
          pl.Config.set_fmt_float("mixed")
          pl.Config.set_float_precision(2)
          pl.Config.set_thousands_separator(None)
          assert os.environ.get("POLARS_VERBOSE") == "0"
  
          # ...load back from config file/string...
          if file is None:
              pl.Config.load(cfg)
          else:
              with pytest.raises(
                  ValueError, match="invalid Config file"
              ):
                  pl.Config.load_from_file(cfg)
  
              if isinstance(file, Path):
                  with pytest.raises(
                      TypeError, match="the JSON object must be str"
                  ):
                      pl.Config.load(file)  # type: ignore[arg-type]
              else:
                  with pytest.raises(
                      ValueError, match="invalid Config string"
                  ):
                      pl.Config.load(file)
  
              pl.Config.load_from_file(file)
  
          # ...and confirm the saved options were set.
          assert os.environ.get("POLARS_FMT_MAX_COLS") == "12"
          assert os.environ.get("POLARS_VERBOSE") == "1"
          assert plr.get_float_fmt() == "full"
          assert plr.get_float_precision() == 6
  
          # restore all default options (unsets from env)
          pl.Config.restore_defaults()
          for e in ("POLARS_FMT_MAX_COLS", "POLARS_VERBOSE"):
              assert e not in pl.Config.state(if_set=True)
              assert e in pl.Config.state()
  
          assert os.environ.get("POLARS_FMT_MAX_COLS") is None
          assert os.environ.get("POLARS_VERBOSE") is None
          assert plr.get_float_fmt() == "mixed"
          assert plr.get_float_precision() is None
  
      # ref: #11094
      with pl.Config(
          streaming_chunk_size=100,
          tbl_cols=2000,
          tbl_formatting="UTF8_NO_BORDERS",
          tbl_hide_column_data_types=True,
          tbl_hide_dtype_separator=True,
          tbl_rows=2000,
          tbl_width_chars=2000,
          verbose=True,
      ):
          assert isinstance(repr(pl.DataFrame({"xyz": [0]})), str)
  
imports: from __future__ import annotations
  import os
  from pathlib import Path
  from typing import Any, Iterator
  import pytest
  import polars
  import polars.polars
  from polars.config import _POLARS_CFG_ENV_VARS
label_desc: Use image node_id 12 for calling a global function with example usage: test_config_load_save(tmp_path) without return types