code: def test_struct_function_expansion() -> None:
      df = pl.DataFrame(
          {
              "a": [1, 2, 3, 4],
              "b": ["one", "two", "three", "four"],
              "c": [9, 8, 7, 6],
          }
      )
      struct_schema = {"a": pl.UInt32, "b": pl.String}
      dfs = df.with_columns(
          pl.struct(pl.col(["a", "b"]), schema=struct_schema)
      )
      s = dfs["a"]
  
      assert isinstance(s, pl.Series)
      assert s.struct.fields == ["a", "b"]
      assert pl.Struct(struct_schema) == s.to_frame().schema["a"]
  
      assert_series_equal(s, pl.Series(dfs.select("a")))
      assert_frame_equal(dfs, pl.DataFrame(dfs))
  
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 8 for calling a global function with example usage: test_struct_function_expansion() without return types