code: def test_sort_by_exps_nulls_last() -> None:
      df = pl.DataFrame(
          {
              "a": [1, 3, -2, None, 1],
          }
      ).with_row_count()
  
      assert df.sort(pl.col("a") ** 2, nulls_last=True).to_dict(
          as_series=False
      ) == {
          "row_nr": [0, 4, 2, 1, 3],
          "a": [1, 1, -2, 3, None],
      }
  
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 7 for calling a global function with example usage: test_sort_by_exps_nulls_last() without return types