code: def test_struct_from_schema_only() -> None:
      # we create a dataframe with default types
      df = pl.DataFrame(
          {
              "str": ["a", "b", "c", "d", "e"],
              "u8": [1, 2, 3, 4, 5],
              "i32": [1, 2, 3, 4, 5],
              "f64": [1, 2, 3, 4, 5],
              "cat": ["a", "b", "c", "d", "e"],
              "datetime": pl.Series(
                  [
                      date(2023, 1, 1),
                      date(2023, 1, 2),
                      date(2023, 1, 3),
                      date(2023, 1, 4),
                      date(2023, 1, 5),
                  ]
              ),
              "bool": [1, 0, 1, 1, 0],
              "list[u8]": [[1], [2], [3], [4], [5]],
          }
      )
  
      # specify a schema with specific dtypes
      s = df.select(
          pl.struct(
              schema={
                  "str": pl.String,
                  "u8": pl.UInt8,
                  "i32": pl.Int32,
                  "f64": pl.Float64,
                  "cat": pl.Categorical,
                  "datetime": pl.Datetime("ms"),
                  "bool": pl.Boolean,
                  "list[u8]": pl.List(pl.UInt8),
              }
          ).alias("s")
      )["s"]
  
      # check dtypes
      assert s.dtype == pl.Struct(
          [
              pl.Field("str", pl.String),
              pl.Field("u8", pl.UInt8),
              pl.Field("i32", pl.Int32),
              pl.Field("f64", pl.Float64),
              pl.Field("cat", pl.Categorical),
              pl.Field("datetime", pl.Datetime("ms")),
              pl.Field("bool", pl.Boolean),
              pl.Field("list[u8]", pl.List(pl.UInt8)),
          ]
      )
  
      # check values
      assert s.to_list() == [
          {
              "str": "a",
              "u8": 1,
              "i32": 1,
              "f64": 1.0,
              "cat": "a",
              "datetime": datetime(2023, 1, 1, 0, 0),
              "bool": True,
              "list[u8]": [1],
          },
          {
              "str": "b",
              "u8": 2,
              "i32": 2,
              "f64": 2.0,
              "cat": "b",
              "datetime": datetime(2023, 1, 2, 0, 0),
              "bool": False,
              "list[u8]": [2],
          },
          {
              "str": "c",
              "u8": 3,
              "i32": 3,
              "f64": 3.0,
              "cat": "c",
              "datetime": datetime(2023, 1, 3, 0, 0),
              "bool": True,
              "list[u8]": [3],
          },
          {
              "str": "d",
              "u8": 4,
              "i32": 4,
              "f64": 4.0,
              "cat": "d",
              "datetime": datetime(2023, 1, 4, 0, 0),
              "bool": True,
              "list[u8]": [4],
          },
          {
              "str": "e",
              "u8": 5,
              "i32": 5,
              "f64": 5.0,
              "cat": "e",
              "datetime": datetime(2023, 1, 5, 0, 0),
              "bool": False,
              "list[u8]": [5],
          },
      ]
  
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 19 for calling a global function with example usage: test_struct_from_schema_only() without return types