code: def test_extend_various_dtypes() -> None:
      with pl.StringCache():
          df1 = pl.DataFrame(
              {
                  "foo": [1, 2],
                  "bar": [True, False],
                  "ham": ["a", "b"],
                  "cat": ["A", "B"],
                  "dates": [datetime(2021, 1, 1), datetime(2021, 2, 1)],
              },
              schema_overrides={"cat": pl.Categorical},
          )
          df2 = pl.DataFrame(
              {
                  "foo": [3, 4],
                  "bar": [True, None],
                  "ham": ["c", "d"],
                  "cat": ["C", "B"],
                  "dates": [datetime(2022, 9, 1), datetime(2021, 2, 1)],
              },
              schema_overrides={"cat": pl.Categorical},
          )
  
          df1.extend(df2)
  
          expected = pl.DataFrame(
              {
                  "foo": [1, 2, 3, 4],
                  "bar": [True, False, True, None],
                  "ham": ["a", "b", "c", "d"],
                  "cat": ["A", "B", "C", "B"],
                  "dates": [
                      datetime(2021, 1, 1),
                      datetime(2021, 2, 1),
                      datetime(2022, 9, 1),
                      datetime(2021, 2, 1),
                  ],
              },
              schema_overrides={"cat": pl.Categorical},
          )
          assert_frame_equal(df1, expected)
  
file_path: polars/py-polars/tests/unit/dataframe/test_extend.py
imports: from datetime import datetime
  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_extend_various_dtypes() without return types