code: def test_replace_mixed_object():
      ser = Series(
          [
              "aBAD",
              np.nan,
              "bBAD",
              True,
              datetime.today(),
              "fooBAD",
              None,
              1,
              2.0,
          ]
      )
      result = Series(ser).str.replace("BAD[_]*", "", regex=True)
      expected = Series(
          [
              "a",
              np.nan,
              "b",
              np.nan,
              np.nan,
              "foo",
              None,
              np.nan,
              np.nan,
          ],
          dtype=object,
      )
      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 14 for calling a global function with example usage: test_replace_mixed_object() without return types