code: def test_match(any_string_dtype):
      # New match behavior introduced in 0.13
      expected_dtype = (
          "object"
          if any_string_dtype in object_pyarrow_numpy
          else "boolean"
      )
  
      values = Series(
          ["fooBAD__barBAD", np.nan, "foo"], dtype=any_string_dtype
      )
      result = values.str.match(".*(BAD[_]+).*(BAD)")
      expected = Series([True, np.nan, False], dtype=expected_dtype)
      tm.assert_series_equal(result, expected)
  
      values = Series(
          ["fooBAD__barBAD", "BAD_BADleroybrown", np.nan, "foo"],
          dtype=any_string_dtype,
      )
      result = values.str.match(".*BAD[_]+.*BAD")
      expected = Series(
          [True, True, np.nan, False], dtype=expected_dtype
      )
      tm.assert_series_equal(result, expected)
  
      result = values.str.match("BAD[_]+.*BAD")
      expected = Series(
          [False, True, np.nan, False], dtype=expected_dtype
      )
      tm.assert_series_equal(result, expected)
  
      values = Series(
          ["fooBAD__barBAD", "^BAD_BADleroybrown", np.nan, "foo"],
          dtype=any_string_dtype,
      )
      result = values.str.match("^BAD[_]+.*BAD")
      expected = Series(
          [False, False, np.nan, False], dtype=expected_dtype
      )
      tm.assert_series_equal(result, expected)
  
      result = values.str.match("\\^BAD[_]+.*BAD")
      expected = Series(
          [False, True, np.nan, False], dtype=expected_dtype
      )
      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 32 for calling a global function with example usage: test_match(any_string_dtype) without return types