code: def _is_dtype_type(arr_or_dtype, condition) -> bool:
      """
      Return true if the condition is satisfied for the arr_or_dtype.
  
      Parameters
      ----------
      arr_or_dtype : array-like or dtype
          The array-like or dtype object whose dtype we want to extract.
      condition : callable[Union[np.dtype, ExtensionDtypeType]]
  
      Returns
      -------
      bool : if the condition is satisfied for the arr_or_dtype
      """
      if arr_or_dtype is None:
          return condition(type(None))
  
      # fastpath
      if isinstance(arr_or_dtype, np.dtype):
          return condition(arr_or_dtype.type)
      elif isinstance(arr_or_dtype, type):
          if issubclass(arr_or_dtype, ExtensionDtype):
              arr_or_dtype = arr_or_dtype.type
          return condition(np.dtype(arr_or_dtype).type)
  
      # if we have an array-like
      if hasattr(arr_or_dtype, "dtype"):
          arr_or_dtype = arr_or_dtype.dtype
  
      # we are not possibly a dtype
      elif is_list_like(arr_or_dtype):
          return condition(type(None))
  
      try:
          tipo = pandas_dtype(arr_or_dtype).type
      except (TypeError, ValueError):
          if is_scalar(arr_or_dtype):
              return condition(type(None))
  
          return False
  
      return condition(tipo)
  
imports: from __future__ import annotations
  from typing import Any, Callable
  import warnings
  import numpy
  from pandas._libs import Interval, Period, algos, lib
  from pandas._libs.tslibs import conversion
  from pandas._typing import ArrayLike, DtypeObj
  from pandas.core.dtypes.base import _registry
  from pandas.core.dtypes.dtypes import CategoricalDtype, DatetimeTZDtype, ExtensionDtype, IntervalDtype, PeriodDtype
  from pandas.core.dtypes.generic import ABCIndex
  from pandas.core.dtypes.inference import is_array_like, is_bool, is_complex, is_dataclass, is_decimal, is_dict_like, is_file_like, is_float, is_hashable, is_integer, is_interval, is_iterator, is_list_like, is_named_tuple, is_nested_list_like, is_number, is_re, is_re_compilable, is_scalar, is_sequence
label_desc: Use image node_id 40 for calling a global function with example usage: _is_dtype_type(arr_or_dtype, condition) and returns: condition, condition, condition, condition, condition, False, condition