code: def test_replace_wrong_repl_type_raises(
      any_string_dtype, index_or_series, repl, data
  ):
      # https://github.com/pandas-dev/pandas/issues/13438
      msg = "repl must be a string or callable"
      obj = index_or_series(data, dtype=any_string_dtype)
      with pytest.raises(TypeError, match=msg):
          obj.str.replace("a", repl)
  
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 16 for calling a global function with example usage: test_replace_wrong_repl_type_raises(any_string_dtype, index_or_series, repl, data) without return types