code: def test_arg_sort_rank_nans() -> None:
      assert (
          pl.DataFrame(
              {
                  "val": [1.0, float("nan")],
              }
          )
          .with_columns(
              [
                  pl.col("val").rank().alias("rank"),
                  pl.col("val").arg_sort().alias("arg_sort"),
              ]
          )
          .select(["rank", "arg_sort"])
      ).to_dict(as_series=False) == {
          "rank": [1.0, 2.0],
          "arg_sort": [0, 1],
      }
  
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 12 for calling a global function with example usage: test_arg_sort_rank_nans() without return types