code: def test_from_dict_with_column_order() -> None:
      # expect schema/columns order to take precedence
      schema = {"a": pl.UInt8, "b": pl.UInt32}
      data = {"b": [3, 4], "a": [1, 2]}
      for df in (
          pl.DataFrame(data, schema=schema),
          pl.DataFrame(
              data, schema=["a", "b"], schema_overrides=schema
          ),
      ):
          # ┌─────┬─────┐
          # │ a   ┆ b   │
          # │ --- ┆ --- │
          # │ u8  ┆ u32 │
          # ╞═════╪═════╡
          # │ 1   ┆ 3   │
          # │ 2   ┆ 4   │
          # └─────┴─────┘
          assert df.columns == ["a", "b"]
          assert df.schema == {"a": pl.UInt8, "b": pl.UInt32}
          assert df.rows() == [(1, 3), (2, 4)]
  
          # expect an error
          mismatched_schema = {"x": pl.UInt8, "b": pl.UInt32}
          with pytest.raises(ValueError):
              pl.DataFrame(
                  {"b": [3, 4], "a": [1, 2]}, schema=mismatched_schema
              )
  
file_path: polars/py-polars/tests/unit/dataframe/test_from_dict.py
imports: from __future__ import annotations
  from datetime import date, datetime, time, timedelta
  from typing import Any
  import numpy
  import pytest
  import polars
  from polars.testing import assert_frame_equal
label_desc: Use image node_id 1 for calling a global function with example usage: test_from_dict_with_column_order() without return types