code: def test_arg_sort_nulls() -> None:
      a = pl.Series("a", [1.0, 2.0, 3.0, None, None])
      assert a.arg_sort(nulls_last=True).to_list() == [0, 1, 2, 3, 4]
      assert a.arg_sort(nulls_last=False).to_list() == [3, 4, 0, 1, 2]
  
      assert a.to_frame().sort(
          by="a", nulls_last=False
      ).to_series().to_list() == [
          None,
          None,
          1.0,
          2.0,
          3.0,
      ]
      assert a.to_frame().sort(
          by="a", nulls_last=True
      ).to_series().to_list() == [
          1.0,
          2.0,
          3.0,
          None,
          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 4 for calling a global function with example usage: test_arg_sort_nulls() without return types