code: def test_asof_join_inline_cast_6438() -> None:
      df_trades = pl.DataFrame(
          {
              "time": [
                  datetime(2020, 1, 1, 9, 1, 0),
                  datetime(2020, 1, 1, 9, 1, 0),
                  datetime(2020, 1, 1, 9, 3, 0),
                  datetime(2020, 1, 1, 9, 6, 0),
              ],
              "stock": ["A", "B", "B", "C"],
              "trade": [101, 299, 301, 500],
          }
      )
  
      df_quotes = pl.DataFrame(
          {
              "time": [
                  datetime(2020, 1, 1, 9, 0, 0),
                  datetime(2020, 1, 1, 9, 2, 0),
                  datetime(2020, 1, 1, 9, 3, 0),
                  datetime(2020, 1, 1, 9, 6, 0),
              ],
              "stock": ["A", "B", "C", "A"],
              "quote": [100, 300, 501, 102],
          }
      ).with_columns([pl.col("time").dt.cast_time_unit("ns")])
  
      assert df_trades.join_asof(
          df_quotes,
          on=pl.col("time").cast(pl.Datetime("ns")).set_sorted(),
          by="stock",
      ).to_dict(as_series=False) == {
          "time": [
              datetime(2020, 1, 1, 9, 1),
              datetime(2020, 1, 1, 9, 1),
              datetime(2020, 1, 1, 9, 3),
              datetime(2020, 1, 1, 9, 6),
          ],
          "stock": ["A", "B", "B", "C"],
          "trade": [101, 299, 301, 500],
          "quote": [100, None, 300, 501],
      }
  
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 2 for calling a global function with example usage: test_asof_join_inline_cast_6438() without return types