code: def test_schemas(
      data: dict[str, list[Any]],
      expr: pl.Expr,
      expected_select: dict[str, pl.PolarsDataType],
      expected_gb: dict[str, pl.PolarsDataType],
  ) -> None:
      df = pl.DataFrame(data)
  
      # test selection schema
      schema = df.select(expr).schema
      for key, dtype in expected_select.items():
          assert schema[key] == dtype
  
      # test group_by schema
      schema = df.group_by(pl.lit(1)).agg(expr).schema
      for key, dtype in expected_gb.items():
          assert schema[key] == dtype
  
imports: from __future__ import annotations
  from collections import OrderedDict
  from datetime import date, timedelta
  from typing import Any, Iterator, Mapping
  import pytest
  import polars
  from polars.testing import assert_frame_equal, assert_series_equal
label_desc: Use image node_id 33 for calling a global function with example usage: test_schemas(data, expr, expected_select, expected_gb) without return types