code: def _assert_scalar(args, dtype):
      if args and dtype:
          assert_fn = None
          if ivy.is_int_dtype(dtype):
  
              def assert_fn(x):  # noqa F811
                  return not isinstance(x, float)
  
          elif ivy.is_bool_dtype(dtype):
  
              def assert_fn(x):
                  return isinstance(x, bool)
  
          if assert_fn:
              ivy.utils.assertions.check_all_or_any_fn(
                  *args,
                  fn=assert_fn,
                  type="all",
                  message=f"type of input is incompatible with dtype: {dtype}",
              )
  
imports: import functools
  from typing import Callable, Any
  import inspect
  import platform
  import ivy
  import ivy.functional.frontends.numpy
label_desc: Use image node_id 4 for calling a global function with example usage: _assert_scalar(args, dtype) and returns: unknown, isinstance