code: def test_ismethods(method, expected, any_string_dtype):
      ser = Series(
          ["A", "b", "Xy", "4", "3A", "", "TT", "55", "-", "  "],
          dtype=any_string_dtype,
      )
      expected_dtype = (
          "bool"
          if any_string_dtype in object_pyarrow_numpy
          else "boolean"
      )
      expected = Series(expected, dtype=expected_dtype)
      result = getattr(ser.str, method)()
      tm.assert_series_equal(result, expected)
  
      # compare with standard library
      expected = [getattr(item, method)() for item in ser]
      assert list(result) == expected
  
imports: from datetime import datetime, timedelta
  import numpy
  import pytest
  from pandas import DataFrame, Index, MultiIndex, Series
  import pandas._testing
  from pandas.core.strings.accessor import StringMethods
  from pandas.tests.strings import object_pyarrow_numpy
label_desc: Use image node_id 9 for calling a global function with example usage: test_ismethods(method, expected, any_string_dtype) without return types