code: def test_sorted_join_and_dtypes() -> None:
      for dt in [pl.Int8, pl.Int16, pl.Int32, pl.Int16]:
          df_a = (
              pl.DataFrame({"a": [-5, -2, 3, 3, 9, 10]})
              .with_row_count()
              .with_columns(pl.col("a").cast(dt).set_sorted())
          )
  
      df_b = pl.DataFrame({"a": [-2, -3, 3, 10]}).with_columns(
          pl.col("a").cast(dt).set_sorted()
      )
  
      assert df_a.join(df_b, on="a", how="inner").to_dict(
          as_series=False
      ) == {
          "row_nr": [1, 2, 3, 5],
          "a": [-2, 3, 3, 10],
      }
      assert df_a.join(df_b, on="a", how="left").to_dict(
          as_series=False
      ) == {
          "row_nr": [0, 1, 2, 3, 4, 5],
          "a": [-5, -2, 3, 3, 9, 10],
      }
  
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 9 for calling a global function with example usage: test_sorted_join_and_dtypes() without return types