code: def test_sort_with_null_12139() -> None:
      df = pl.DataFrame(
          {
              "bool": [True, False, None, True, False],
              "float": [1.0, 2.0, 3.0, 4.0, 5.0],
          }
      )
  
      assert df.sort(
          "bool", descending=False, nulls_last=False
      ).to_dict(as_series=False) == {
          "bool": [None, False, False, True, True],
          "float": [3.0, 2.0, 5.0, 1.0, 4.0],
      }
  
      assert df.sort("bool", descending=False, nulls_last=True).to_dict(
          as_series=False
      ) == {
          "bool": [False, False, True, True, None],
          "float": [2.0, 5.0, 1.0, 4.0, 3.0],
      }
  
      assert df.sort("bool", descending=True, nulls_last=True).to_dict(
          as_series=False
      ) == {
          "bool": [True, True, False, False, None],
          "float": [1.0, 4.0, 2.0, 5.0, 3.0],
      }
  
      assert df.sort("bool", descending=True, nulls_last=False).to_dict(
          as_series=False
      ) == {
          "bool": [None, True, True, False, False],
          "float": [3.0, 1.0, 4.0, 2.0, 5.0],
      }
  
imports: from __future__ import annotations
  from datetime import date, datetime
  from typing import Any
  import pytest
  import polars
  from polars.testing import assert_frame_equal, assert_series_equal
label_desc: Use image node_id 41 for calling a global function with example usage: test_sort_with_null_12139() without return types