code: def check_dtypes(
      xp: Any, dtypes: List[DataType], stubs: List[str]
  ) -> None:
      if len(dtypes) == 0:
          assert len(stubs) > 0, "No dtypes passed but stubs is empty"
          f_stubs = ", ".join(stubs)
          raise InvalidArgument(
              f"Array module {xp.__name__} does not have the following "
              f"required dtypes in its namespace: {f_stubs}"
          )
      elif len(stubs) > 0:
          warn_on_missing_dtypes(xp, stubs)
  
imports: import math
  import sys
  from numbers import Real
  from types import SimpleNamespace
  from typing import TYPE_CHECKING, Any, Iterable, Iterator, List, Literal, Mapping, NamedTuple, Optional, Sequence, Tuple, Type, TypeVar, Union, get_args
  from warnings import warn
  from weakref import WeakValueDictionary
  from hypothesis import strategies
  from hypothesis.errors import HypothesisWarning, InvalidArgument
  from hypothesis.extra._array_helpers import NDIM_MAX, BasicIndex, BasicIndexStrategy, BroadcastableShapes, Shape, array_shapes, broadcastable_shapes, check_argument, check_valid_dims, mutually_broadcastable_shapes, order_check, valid_tuple_axes
  from hypothesis.internal.conjecture import utils
  from hypothesis.internal.coverage import check_function
  from hypothesis.internal.floats import next_down
  from hypothesis.internal.reflection import proxies
  from hypothesis.internal.validation import check_type, check_valid_bound, check_valid_integer, check_valid_interval
  from hypothesis.strategies._internal.strategies import check_strategy
  from hypothesis.strategies._internal.utils import defines_strategy
label_desc: Use image node_id 8 for calling a global function with example usage: check_dtypes(xp, dtypes, stubs) without return types