code: def test_replace_categorical_ea_dtype():
      # GH49404
      cat = Categorical(pd.array(["a", "b"], dtype="string"))
      msg = (
          r"The behavior of Series\.replace \(and DataFrame.replace\) "
          "with CategoricalDtype"
      )
      with tm.assert_produces_warning(FutureWarning, match=msg):
          result = (
              pd.Series(cat).replace(["a", "b"], ["c", pd.NA])._values
          )
      expected = Categorical(pd.array(["c", pd.NA], dtype="string"))
      tm.assert_categorical_equal(result, expected)
  
file_path: pandas/pandas/tests/arrays/categorical/test_replace.py
imports: import pytest
  import pandas
  from pandas import Categorical
  import pandas._testing
label_desc: Use image node_id 3 for calling a global function with example usage: test_replace_categorical_ea_dtype() without return types