code: def test_struct_comparison() -> None:
      df = pl.DataFrame(
          {
              "col1": [{"a": 1, "b": 2}, {"a": 3, "b": 4}],
              "col2": [{"a": 1, "b": 2}, {"a": 3, "b": 4}],
          }
      )
      assert df.filter(pl.col("col1") == pl.col("col2")).rows() == [
          ({"a": 1, "b": 2}, {"a": 1, "b": 2}),
          ({"a": 3, "b": 4}, {"a": 3, "b": 4}),
      ]
      # floats w/ ints
      df = pl.DataFrame(
          {
              "col1": [{"a": 1, "b": 2}, {"a": 3, "b": 4}],
              "col2": [{"a": 1.0, "b": 2}, {"a": 3.0, "b": 4}],
          }
      )
      assert df.filter(pl.col("col1") == pl.col("col2")).rows() == [
          ({"a": 1, "b": 2}, {"a": 1.0, "b": 2}),
          ({"a": 3, "b": 4}, {"a": 3.0, "b": 4}),
      ]
  
      df = pl.DataFrame(
          {
              "col1": [{"a": 1, "b": 2}, {"a": 3, "b": 4}],
              "col2": [{"a": 2, "b": 2}, {"a": 3, "b": 4}],
          }
      )
      assert df.filter(pl.col("col1") == pl.col("col2")).to_dict(
          as_series=False
      ) == {
          "col1": [{"a": 3, "b": 4}],
          "col2": [{"a": 3, "b": 4}],
      }
  
imports: from __future__ import annotations
  from dataclasses import dataclass
  from datetime import datetime, time
  from typing import TYPE_CHECKING
  import pandas
  import pyarrow
  import pytest
  import polars
  import polars.selectors
  from polars.testing import assert_frame_equal, assert_series_equal
label_desc: Use image node_id 23 for calling a global function with example usage: test_struct_comparison() without return types