code: def npy_ctypes_check(cls):
      # determine if a class comes from ctypes, in order to work around
      # a bug in the buffer protocol for those objects, bpo-10746
      try:
          # ctypes class are new-style, so have an __mro__. This probably fails
          # for ctypes classes with multiple inheritance.
          if IS_PYPY:
              # (..., _ctypes.basics._CData, Bufferable, object)
              ctype_base = cls.__mro__[-3]
          else:
              # # (..., _ctypes._CData, object)
              ctype_base = cls.__mro__[-2]
          # right now, they're part of the _ctypes module
          return "_ctypes" in ctype_base.__module__
      except Exception:
          return False
  
imports: import ast
  import re
  import sys
  import warnings
  from ..exceptions import DTypePromotionError
  from .multiarray import dtype, array, ndarray, promote_types
label_desc: Use image node_id 22 for calling a global function with example usage: npy_ctypes_check(cls) and returns: unknown, False