code: def test_to_from_pydecimal_and_format(
      trim_zeros: bool, expected: str
  ) -> None:
      dec_strs = [
          "0",
          "-1",
          expected,
          "-1.123801239123981293891283123",
          "12345678901.234567890123458390192857685",
          "-99999999999.999999999999999999999999999",
      ]
      with pl.Config(trim_decimal_zeros=trim_zeros):
          formatted = (
              str(pl.Series(list(map(D, dec_strs))))
              .split("[", 1)[1]
              .split("\n", 1)[1]
              .strip()[1:-1]
              .split()
          )
          assert formatted == dec_strs
  
imports: from __future__ import annotations
  import io
  import itertools
  from dataclasses import dataclass
  from decimal import Decimal
  from typing import Any, NamedTuple
  import numpy
  import pytest
  from numpy.testing import assert_array_equal
  import polars
  from polars.testing import assert_frame_equal
label_desc: Use image node_id 4 for calling a global function with example usage: test_to_from_pydecimal_and_format(trim_zeros, expected) without return types