code: def test_empty_string_replace() -> None:
      s = pl.Series("", [], dtype=pl.String)
      assert_series_equal(s.str.replace("a", "b", literal=True), s)
      assert_series_equal(s.str.replace("a", "b"), s)
      assert_series_equal(s.str.replace("ab", "b", literal=True), s)
      assert_series_equal(s.str.replace("ab", "b"), s)
  
file_path: polars/py-polars/tests/unit/test_empty.py
imports: 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_empty_string_replace() without return types