code: def is_string_dtype(arr_or_dtype) -> bool:
      # is_string_dtype did not recognize pyarrow strings before 2.0
      # Can remove once 2.0 is minimum version for us
      if hasattr(arr_or_dtype, "dtype"):
          dtype = arr_or_dtype.dtype
      else:
          dtype = arr_or_dtype
  
      if not PANDAS_GE_200:
          return pd.api.types.is_dtype_equal(dtype, "string")
      return pd.api.types.is_string_dtype(dtype)
  
imports: from __future__ import annotations
  import contextlib
  import string
  import warnings
  import numpy
  import pandas
  from packaging.version import Version
  import pandas.testing
label_desc: Use image node_id 21 for calling a global function with example usage: is_string_dtype(arr_or_dtype) and returns: pd, pd