code: def test_swapcase(any_string_dtype):
      s = Series(
          ["FOO", "BAR", np.nan, "Blah", "blurg"],
          dtype=any_string_dtype,
      )
      result = s.str.swapcase()
      expected = Series(
          ["foo", "bar", np.nan, "bLAH", "BLURG"],
          dtype=any_string_dtype,
      )
      tm.assert_series_equal(result, expected)
  
imports: from datetime import datetime
  import operator
  import numpy
  import pytest
  from pandas import Series, _testing
label_desc: Use image node_id 7 for calling a global function with example usage: test_swapcase(any_string_dtype) without return types