code: def isdtype(
      dtype: Dtype,
      kind: Union[Dtype, str, Tuple[Union[Dtype, str], ...]],
  ) -> bool:
      """
      Returns a boolean indicating whether a provided dtype is of a specified data type ``kind``.
  
      See
      https://data-apis.org/array-api/latest/API_specification/generated/array_api.isdtype.html
      for more details
      """
      if isinstance(kind, tuple):
          # Disallow nested tuples
          if any(isinstance(k, tuple) for k in kind):
              raise TypeError(
                  "'kind' must be a dtype, str, or tuple of dtypes and strs"
              )
          return any(isdtype(dtype, k) for k in kind)
      elif isinstance(kind, str):
          if kind == "bool":
              return dtype in _boolean_dtypes
          elif kind == "signed integer":
              return dtype in _signed_integer_dtypes
          elif kind == "unsigned integer":
              return dtype in _unsigned_integer_dtypes
          elif kind == "integral":
              return dtype in _integer_dtypes
          elif kind == "real floating":
              return dtype in _real_floating_dtypes
          elif kind == "complex floating":
              return dtype in _complex_floating_dtypes
          elif kind == "numeric":
              return dtype in _numeric_dtypes
          else:
              raise ValueError(f"Unrecognized data type kind: {kind!r}")
      elif kind in _all_dtypes:
          return dtype == kind
      else:
          raise TypeError(
              f"'kind' must be a dtype, str, or tuple of dtypes and strs, not {type(kind).__name__}"
          )
  
file_path: catboost/contrib/python/numpy/py3/numpy/array_api/_data_type_functions.py
imports: from __future__ import annotations
  from ._array_object import Array
  from ._dtypes import _all_dtypes, _boolean_dtypes, _signed_integer_dtypes, _unsigned_integer_dtypes, _integer_dtypes, _real_floating_dtypes, _complex_floating_dtypes, _numeric_dtypes, _result_type
  from dataclasses import dataclass
  from typing import TYPE_CHECKING, List, Tuple, Union
  import numpy
label_desc: Use image node_id 7 for calling a global function with example usage: isdtype(dtype, kind) and returns: any, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown