code: def test_apply_unnest() -> None:
      df = (
          pl.Series([None, 2, 3, 4])
          .map_elements(
              lambda x: {
                  "a": x,
                  "b": x * 2,
                  "c": True,
                  "d": [1, 2],
                  "e": "foo",
              }
          )
          .struct.unnest()
      )
  
      expected = pl.DataFrame(
          {
              "a": [None, 2, 3, 4],
              "b": [None, 4, 6, 8],
              "c": [None, True, True, True],
              "d": [None, [1, 2], [1, 2], [1, 2]],
              "e": [None, "foo", "foo", "foo"],
          }
      )
  
      assert_frame_equal(df, expected)
  
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 2 for calling a global function with example usage: test_apply_unnest() without return types