code: def test_format_numeric_locale_options() -> None:
      df = pl.DataFrame(
          {
              "a": ["xx", "yy"],
              "b": [100000.987654321, -234567.89],
              "c": [-11111111, 44444444444],
              "d": [D("12345.6789"), D("-9999999.99")],
          }
      )
  
      # note: numeric digit grouping looks much better
      # when right-aligned with fixed float precision
      with pl.Config(
          tbl_cell_numeric_alignment="RIGHT",
          thousands_separator=",",
          float_precision=3,
      ):
          print(df)
          assert (
              str(df)
              == """shape: (2, 4)
  ┌─────┬──────────────┬────────────────┬─────────────────┐
  │ a   ┆            b ┆              c ┆               d │
  │ --- ┆          --- ┆            --- ┆             --- │
  │ str ┆          f64 ┆            i64 ┆    decimal[*,4] │
  ╞═════╪══════════════╪════════════════╪═════════════════╡
  │ xx  ┆  100,000.988 ┆    -11,111,111 ┆     12,345.6789 │
  │ yy  ┆ -234,567.890 ┆ 44,444,444,444 ┆ -9,999,999.9900 │
  └─────┴──────────────┴────────────────┴─────────────────┘"""
          )
  
      # switch digit/decimal separators
      with pl.Config(
          decimal_separator=",",
          thousands_separator=".",
      ):
          assert (
              str(df)
              == """shape: (2, 4)
  ┌─────┬────────────────┬────────────────┬─────────────────┐
  │ a   ┆ b              ┆ c              ┆ d               │
  │ --- ┆ ---            ┆ ---            ┆ ---             │
  │ str ┆ f64            ┆ i64            ┆ decimal[*,4]    │
  ╞═════╪════════════════╪════════════════╪═════════════════╡
  │ xx  ┆ 100.000,987654 ┆ -11.111.111    ┆ 12.345,6789     │
  │ yy  ┆ -234.567,89    ┆ 44.444.444.444 ┆ -9.999.999,9900 │
  └─────┴────────────────┴────────────────┴─────────────────┘"""
          )
  
      # default (no digit grouping, standard digit/decimal separators)
      assert (
          str(df)
          == """shape: (2, 4)
  ┌─────┬───────────────┬─────────────┬───────────────┐
  │ a   ┆ b             ┆ c           ┆ d             │
  │ --- ┆ ---           ┆ ---         ┆ ---           │
  │ str ┆ f64           ┆ i64         ┆ decimal[*,4]  │
  ╞═════╪═══════════════╪═════════════╪═══════════════╡
  │ xx  ┆ 100000.987654 ┆ -11111111   ┆ 12345.6789    │
  │ yy  ┆ -234567.89    ┆ 44444444444 ┆ -9999999.9900 │
  └─────┴───────────────┴─────────────┴───────────────┘"""
      )
  
file_path: polars/py-polars/tests/unit/test_format.py
imports: from __future__ import annotations
  from decimal import Decimal
  from typing import Any, Iterator
  import pytest
  import polars
  from polars import ComputeError
label_desc: Use image node_id 9 for calling a global function with example usage: test_format_numeric_locale_options() without return types