code: def test_list_empty_group_by_result_3521() -> None:
      # Create a left relation where the join column contains a null value
      left = pl.DataFrame().with_columns(
          [
              pl.lit(1).alias("group_by_column"),
              pl.lit(None).cast(pl.Int32).alias("join_column"),
          ]
      )
  
      # Create a right relation where there is a column to count distinct on
      right = pl.DataFrame().with_columns(
          [
              pl.lit(1).alias("join_column"),
              pl.lit(1).alias("n_unique_column"),
          ]
      )
  
      # Calculate n_unique after dropping nulls
      # This will panic on polars version 0.13.38 and 0.13.39
      assert (
          left.join(right, on="join_column", how="left")
          .group_by("group_by_column")
          .agg(pl.col("n_unique_column").drop_nulls())
      ).to_dict(as_series=False) == {
          "group_by_column": [1],
          "n_unique_column": [[]],
      }
  
imports: from __future__ import annotations
  import pickle
  from datetime import date, datetime, time
  from typing import TYPE_CHECKING, Any
  import pandas
  import pytest
  import polars
  from polars.testing import assert_frame_equal, assert_series_equal
label_desc: Use image node_id 4 for calling a global function with example usage: test_list_empty_group_by_result_3521() without return types