code: def test_join_asof_mismatched_dtypes() -> None:
      # test 'on' dtype mismatch
      df1 = pl.DataFrame(
          {
              "a": pl.Series([1, 2, 3], dtype=pl.Int64),
              "b": ["a", "b", "c"],
          }
      )
      df2 = pl.DataFrame(
          {
              "a": pl.Series([1, 2, 3], dtype=pl.Int32),
              "c": ["d", "e", "f"],
          }
      )
  
      with pytest.raises(
          pl.exceptions.ComputeError,
          match="datatypes of join keys don't match",
      ):
          df1.join_asof(df2, on="a", strategy="forward")
  
      # test 'by' dtype mismatch
      df1 = pl.DataFrame(
          {
              "time": pl.date_range(
                  date(2018, 1, 1), date(2018, 1, 8), eager=True
              ),
              "group": pl.Series(
                  [1, 1, 1, 1, 2, 2, 2, 2], dtype=pl.Int32
              ),
              "value": [0, 0, None, None, 2, None, 1, None],
          }
      )
      df2 = pl.DataFrame(
          {
              "time": pl.date_range(
                  date(2018, 1, 1), date(2018, 1, 8), eager=True
              ),
              "group": pl.Series(
                  [1, 1, 1, 1, 2, 2, 2, 2], dtype=pl.Int64
              ),
              "value": [0, 0, None, None, 2, None, 1, None],
          }
      )
  
      with pytest.raises(
          pl.exceptions.ComputeError,
          match="mismatching dtypes in 'by' parameter",
      ):
          df1.join_asof(df2, on="time", by="group", strategy="forward")
  
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 6 for calling a global function with example usage: test_join_asof_mismatched_dtypes() without return types