code: def test_replace_literal(regex, expected_val, any_string_dtype):
      # GH16808 literal replace (regex=False vs regex=True)
      ser = Series(["f.o", "foo", np.nan], dtype=any_string_dtype)
      expected = Series(
          ["bao", expected_val, np.nan], dtype=any_string_dtype
      )
      result = ser.str.replace("f.", "ba", regex=regex)
      tm.assert_series_equal(result, expected)
  
imports: from datetime import datetime
  import re
  import numpy
  import pytest
  from pandas.errors import PerformanceWarning
  import pandas.util._test_decorators
  import pandas
  from pandas import Series, _testing
  from pandas.tests.strings import _convert_na_value, object_pyarrow_numpy
label_desc: Use image node_id 25 for calling a global function with example usage: test_replace_literal(regex, expected_val, any_string_dtype) without return types