code: def test_logical_explode() -> None:
      out = (
          pl.DataFrame(
              {"cats": ["Value1", "Value2", "Value1"]},
              schema_overrides={"cats": pl.Categorical},
          )
          .group_by(1)
          .agg(pl.struct("cats"))
          .explode("cats")
          .unnest("cats")
      )
      assert out["cats"].dtype == pl.Categorical
      assert out["cats"].to_list() == ["Value1", "Value2", "Value1"]
  
imports: from __future__ import annotations
  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 19 for calling a global function with example usage: test_logical_explode() without return types