code: def test_merge_sorted() -> None:
      df_a = (
          pl.datetime_range(
              datetime(2022, 1, 1),
              datetime(2022, 12, 1),
              "1mo",
              eager=True,
          )
          .to_frame("range")
          .with_row_count()
      )
  
      df_b = (
          pl.datetime_range(
              datetime(2022, 1, 1),
              datetime(2022, 12, 1),
              "2mo",
              eager=True,
          )
          .to_frame("range")
          .with_row_count()
          .with_columns(pl.col("row_nr") * 10)
      )
      out = df_a.merge_sorted(df_b, key="range")
      assert out["range"].is_sorted()
      assert out.to_dict(as_series=False) == {
          "row_nr": [
              0,
              0,
              1,
              2,
              10,
              3,
              4,
              20,
              5,
              6,
              30,
              7,
              8,
              40,
              9,
              10,
              50,
              11,
          ],
          "range": [
              datetime(2022, 1, 1, 0, 0),
              datetime(2022, 1, 1, 0, 0),
              datetime(2022, 2, 1, 0, 0),
              datetime(2022, 3, 1, 0, 0),
              datetime(2022, 3, 1, 0, 0),
              datetime(2022, 4, 1, 0, 0),
              datetime(2022, 5, 1, 0, 0),
              datetime(2022, 5, 1, 0, 0),
              datetime(2022, 6, 1, 0, 0),
              datetime(2022, 7, 1, 0, 0),
              datetime(2022, 7, 1, 0, 0),
              datetime(2022, 8, 1, 0, 0),
              datetime(2022, 9, 1, 0, 0),
              datetime(2022, 9, 1, 0, 0),
              datetime(2022, 10, 1, 0, 0),
              datetime(2022, 11, 1, 0, 0),
              datetime(2022, 11, 1, 0, 0),
              datetime(2022, 12, 1, 0, 0),
          ],
      }
  
imports: from __future__ import annotations
  from datetime import date, datetime
  from typing import Any
  import pytest
  import polars
  from polars.testing import assert_frame_equal, assert_series_equal
label_desc: Use image node_id 21 for calling a global function with example usage: test_merge_sorted() without return types