code: def test_list_fill_null() -> None:
      df = pl.DataFrame({"C": [["a", "b", "c"], [], [], ["d", "e"]]})
      assert df.with_columns(
          [
              pl.when(pl.col("C").list.len() == 0)
              .then(None)
              .otherwise(pl.col("C"))
              .alias("C")
          ]
      ).to_series().to_list() == [
          ["a", "b", "c"],
          None,
          None,
          ["d", "e"],
      ]
  
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 5 for calling a global function with example usage: test_list_fill_null() without return types