code: def test_partition_series_stdlib(any_string_dtype, method):
      # https://github.com/pandas-dev/pandas/issues/23558
      # compare to standard lib
      s = Series(
          ["A_B_C", "B_C_D", "E_F_G", "EFGHEF"], dtype=any_string_dtype
      )
      result = getattr(s.str, method)("_", expand=False).tolist()
      assert result == [getattr(v, method)("_") for v in s]
  
imports: from datetime import datetime
  import re
  import numpy
  import pytest
  import pandas
  from pandas import DataFrame, Index, MultiIndex, Series, _testing
  from pandas.tests.strings import _convert_na_value, object_pyarrow_numpy
label_desc: Use image node_id 35 for calling a global function with example usage: test_partition_series_stdlib(any_string_dtype, method) without return types