code: def test_sql_trim(foods_ipc_path: Path) -> None:
      lf = pl.scan_ipc(foods_ipc_path)
      out = pl.SQLContext(foods1=lf).execute(
          """
          SELECT DISTINCT TRIM(LEADING 'vmf' FROM category) as new_category
          FROM foods1
          ORDER BY new_category DESC
          """,
          eager=True,
      )
      assert out.to_dict(as_series=False) == {
          "new_category": ["seafood", "ruit", "egetables", "eat"]
      }
      with pytest.raises(
          ComputeError,
          match="unsupported TRIM",
      ):
          # currently unsupported (snowflake) trim syntax
          pl.SQLContext(foods=lf).execute(
              """
              SELECT DISTINCT TRIM('*^xxxx^*', '^*') as new_category FROM foods
              """,
          )
  
imports: from __future__ import annotations
  import datetime
  import math
  from pathlib import Path
  import pytest
  import polars
  import polars.selectors
  from polars.exceptions import ComputeError, InvalidOperationError
  from polars.testing import assert_frame_equal, assert_series_equal
label_desc: Use image node_id 29 for calling a global function with example usage: test_sql_trim(foods_ipc_path) without return types