code: def make_kind_check(python_types, numpy_kind):
      """
      Make a function that checks whether a scalar or array is of a given kind
      (e.g. float, int, datetime, timedelta).
      """
  
      def check(value):
          if hasattr(value, "dtype"):
              return value.dtype.kind == numpy_kind
          return isinstance(value, python_types)
  
      return check
  
imports: from collections import OrderedDict
  from datetime import datetime
  from warnings import catch_warnings, filterwarnings
  import numpy
  from numpy import broadcast, busday_count, datetime64, diff, dtype, empty, flatnonzero, hstack, isnan, nan, vectorize, where
  from numpy.lib.stride_tricks import as_strided
  from toolz import flip
label_desc: Use image node_id 4 for calling a global function with example usage: make_kind_check(python_types, numpy_kind) and returns: check, isinstance, unknown