code: def test_replace_str_to_str_default_other(
      str_mapping: dict[str | None, str]
  ) -> None:
      df = pl.DataFrame({"country_code": ["FR", None, "ES", "DE"]})
  
      result = df.with_row_count().select(
          replaced=pl.col("country_code").replace(
              str_mapping, default=pl.col("row_nr")
          )
      )
      expected = pl.DataFrame(
          {"replaced": ["France", "Not specified", "2", "Germany"]}
      )
      assert_frame_equal(result, expected)
  
imports: from __future__ import annotations
  import contextlib
  from typing import Any
  import pytest
  import polars
  from polars.exceptions import CategoricalRemappingWarning
  from polars.testing import assert_frame_equal, assert_series_equal
label_desc: Use image node_id 5 for calling a global function with example usage: test_replace_str_to_str_default_other(str_mapping) without return types