code: def _casting_no_special_case(dtype1, dtype, none=False):
      if dtype == "float16":
          allowed_dtypes = ["float32", "float64"]
          if not none:
              allowed_dtypes += ["float16"]
          return dtype1 in allowed_dtypes
      if dtype in ["int8", "uint8"]:
          if none:
              return ivy.is_int_dtype(dtype1) and dtype1 not in [
                  "int8",
                  "uint8",
              ]
          return ivy.is_int_dtype(dtype1)
      return dtype1 == 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 5 for calling a global function with example usage: _casting_no_special_case(dtype1, dtype, none) and returns: unknown, unknown, ivy, unknown