parameters: (arr_or_dtype, condition)
return_statement: return condition(dtype)
docstring: Return a boolean if the condition is satisfied for the arr_or_dtype.
  
      Parameters
      ----------
      arr_or_dtype : array-like, str, np.dtype, or ExtensionArrayType
          The array-like or dtype object whose dtype we want to extract.
      condition : callable[Union[np.dtype, ExtensionDtype]]
  
      Returns
      -------
      bool
docstring_summary: Return a boolean if the condition is satisfied for the arr_or_dtype.
docstring_tokens: Return a boolean if the condition is satisfied for the arr_or_dtype .
function: def _is_dtype(arr_or_dtype, condition) -> bool:
      """
      Return a boolean if the condition is satisfied for the arr_or_dtype.
  
      Parameters
      ----------
      arr_or_dtype : array-like, str, np.dtype, or ExtensionArrayType
          The array-like or dtype object whose dtype we want to extract.
      condition : callable[Union[np.dtype, ExtensionDtype]]
  
      Returns
      -------
      bool
  
      """
  
      if arr_or_dtype is None:
          return False
      try:
          dtype = _get_dtype(arr_or_dtype)
      except (TypeError, ValueError, UnicodeEncodeError):
          return False
      return condition(dtype)
function_tokens: def _is_dtype ( arr_or_dtype , condition ) -> bool : if arr_or_dtype is None : return False try : dtype = _get_dtype ( arr_or_dtype ) except ( TypeError , ValueError , UnicodeEncodeError ) : return False return condition ( dtype )