code: def test_join_asof_projection() -> None:
      df1 = pl.DataFrame(
          {
              "df1_date": [
                  20221011,
                  20221012,
                  20221013,
                  20221014,
                  20221016,
              ],
              "df1_col1": ["foo", "bar", "foo", "bar", "foo"],
              "key": ["a", "b", "b", "a", "b"],
          }
      ).set_sorted("df1_date")
  
      df2 = pl.DataFrame(
          {
              "df2_date": [20221012, 20221015, 20221018],
              "df2_col1": ["1", "2", "3"],
              "key": ["a", "b", "b"],
          }
      ).set_sorted("df2_date")
  
      assert (
          (
              df1.lazy().join_asof(
                  df2.lazy(), left_on="df1_date", right_on="df2_date"
              )
          ).select([pl.col("df2_date"), "df1_date"])
      ).collect().to_dict(as_series=False) == {
          "df2_date": [None, 20221012, 20221012, 20221012, 20221015],
          "df1_date": [
              20221011,
              20221012,
              20221013,
              20221014,
              20221016,
          ],
      }
      assert (
          df1.lazy().join_asof(
              df2.lazy(),
              by="key",
              left_on="df1_date",
              right_on="df2_date",
          )
      ).select(["df2_date", "df1_date"]).collect().to_dict(
          as_series=False
      ) == {
          "df2_date": [None, None, None, 20221012, 20221015],
          "df1_date": [
              20221011,
              20221012,
              20221013,
              20221014,
              20221016,
          ],
      }
  
imports: from datetime import date, datetime, timedelta
  from typing import Any
  import numpy
  import pytest
  import polars
  from polars.testing import assert_frame_equal
label_desc: Use image node_id 10 for calling a global function with example usage: test_join_asof_projection() without return types