code: def test_sql_union(
      cols1: list[str],
      cols2: list[str],
      union_subtype: str,
      expected: list[tuple[int, str]],
  ) -> None:
      with pl.SQLContext(
          frame1=pl.DataFrame({"c1": [1, 2], "c2": ["zz", "yy"]}),
          frame2=pl.DataFrame({"c1": [2, 3], "c2": ["yy", "xx"]}),
          eager_execution=True,
      ) as ctx:
          query = f"""
              SELECT {', '.join(cols1)} FROM frame1
              UNION {union_subtype}
              SELECT {', '.join(cols2)} FROM frame2
          """
          assert sorted(ctx.execute(query).rows()) == expected
  
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 30 for calling a global function with example usage: test_sql_union(cols1, cols2, union_subtype, expected) without return types