code: def test_struct_broadcasting() -> None:
      df = pl.DataFrame(
          {
              "col1": [1, 2],
              "col2": [10, 20],
          }
      )
  
      assert (
          df.select(
              pl.struct(
                  [
                      pl.lit("a").alias("a"),
                      pl.col("col1").alias("col1"),
                  ]
              ).alias("my_struct")
          )
      ).to_dict(as_series=False) == {
          "my_struct": [{"a": "a", "col1": 1}, {"a": "a", "col1": 2}]
      }
  
imports: from __future__ import annotations
  from datetime import date, datetime
  from typing import TYPE_CHECKING
  import pytest
  import polars
  from polars.testing import assert_frame_equal, assert_series_equal
label_desc: Use image node_id 20 for calling a global function with example usage: test_struct_broadcasting() without return types