code: def test_streaming_joins() -> None:
      n = 100
      dfa = pd.DataFrame(
          {
              "a": np.random.randint(0, 40, n),
              "b": np.arange(0, n),
          }
      )
  
      n = 100
      dfb = pd.DataFrame(
          {
              "a": np.random.randint(0, 40, n),
              "b": np.arange(0, n),
          }
      )
      dfa_pl = pl.from_pandas(dfa).sort("a")
      dfb_pl = pl.from_pandas(dfb)
  
      join_strategies: list[Literal["inner", "left"]] = [
          "inner",
          "left",
      ]
      for how in join_strategies:
          pd_result = dfa.merge(dfb, on="a", how=how)
          pd_result.columns = pd.Index(["a", "b", "b_right"])
  
          pl_result = (
              dfa_pl.lazy()
              .join(dfb_pl.lazy(), on="a", how=how)
              .sort(["a", "b"])
              .collect(streaming=True)
          )
  
          a = (
              pl.from_pandas(pd_result)
              .with_columns(pl.all().cast(int))
              .sort(["a", "b"])
          )
          assert_frame_equal(a, pl_result, check_dtype=False)
  
          pd_result = dfa.merge(dfb, on=["a", "b"], how=how)
  
          pl_result = (
              dfa_pl.lazy()
              .join(dfb_pl.lazy(), on=["a", "b"], how=how)
              .sort(["a", "b"])
              .collect(streaming=True)
          )
  
          # we cast to integer because pandas joins creates floats
          a = (
              pl.from_pandas(pd_result)
              .with_columns(pl.all().cast(int))
              .sort(["a", "b"])
          )
          assert_frame_equal(a, pl_result, check_dtype=False)
  
file_path: polars/py-polars/tests/unit/streaming/test_streaming_join.py
imports: from __future__ import annotations
  from typing import Literal
  import numpy
  import pandas
  import pytest
  import polars
  from polars.testing import assert_frame_equal
label_desc: Use image node_id 1 for calling a global function with example usage: test_streaming_joins() without return types