code: def test_sql_limit_offset() -> None:
      n_values = 11
      lf = pl.LazyFrame(
          {"a": range(n_values), "b": reversed(range(n_values))}
      )
      ctx = pl.SQLContext(tbl=lf)
  
      assert ctx.execute(
          "SELECT * FROM tbl LIMIT 3 OFFSET 4", eager=True
      ).rows() == [
          (4, 6),
          (5, 5),
          (6, 4),
      ]
      for offset, limit in [
          (0, 3),
          (1, n_values),
          (2, 3),
          (5, 3),
          (8, 5),
          (n_values, 1),
      ]:
          out = ctx.execute(
              f"SELECT * FROM tbl LIMIT {limit} OFFSET {offset}",
              eager=True,
          )
          assert_frame_equal(out, lf.slice(offset, limit).collect())
          assert len(out) == min(limit, n_values - offset)
  
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 12 for calling a global function with example usage: test_sql_limit_offset() without return types